From dfdf6b5c1f7d667394a4ea1f56fb3786af04228d Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:06:01 -0600 Subject: [PATCH 1/9] feat(cost): consume query-matched offline sketch evidence --- .../src/empirical_comparison.rs | 823 ++++++++++++++++++ .../asap-aware-mapping/src/empirical_cost.rs | 699 +++++++++++++++ crates/asap-aware-mapping/src/lib.rs | 2 + .../data/offline-evidence-synthetic.json | 67 ++ .../offline-comparison-evidence.schema.json | 180 ++++ .../developer_docs/offline-sketch-evidence.md | 124 +++ .../offline-sketch-evidence.schema.json | 774 ++++++++++++++++ 7 files changed, 2669 insertions(+) create mode 100644 crates/asap-aware-mapping/src/empirical_comparison.rs create mode 100644 crates/asap-aware-mapping/src/empirical_cost.rs create mode 100644 crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json create mode 100644 docs/developer_docs/offline-comparison-evidence.schema.json create mode 100644 docs/developer_docs/offline-sketch-evidence.md create mode 100644 docs/developer_docs/offline-sketch-evidence.schema.json diff --git a/crates/asap-aware-mapping/src/empirical_comparison.rs b/crates/asap-aware-mapping/src/empirical_comparison.rs new file mode 100644 index 00000000..be6cb12b --- /dev/null +++ b/crates/asap-aware-mapping/src/empirical_comparison.rs @@ -0,0 +1,823 @@ +//! Query-matched, fixed-snapshot offline recommendations. Observed error is an +//! explicit acceptance criterion, never a replacement for formal guarantees. + +use asap_types::post_asap::{SketchAlgorithm, SketchParams}; +use serde::{Deserialize, Serialize}; + +use crate::empirical_cost::{ + DistributionDescriptor, EmpiricalEvidenceProvider, EnvironmentDescriptor, EvidenceArtifact, + EvidenceContext, Measurement, MeasurementProvenance, OfflineMeasurement, +}; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineQueryDescriptor { + pub kind: String, + pub value_type: String, + /// Identifies the exact probe population used for timing and observed error. + pub probe_set: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct MeasurementQueryBinding { + pub record_id: String, + pub query: OfflineQueryDescriptor, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct ExactResourceMeasurements { + pub empty_build_cpu_ns: Option, + pub update_cpu_ns: Option, + /// One prepare pass after ingesting the complete snapshot, before any read. + pub prepare_cpu_ns: Option, + pub read_cpu_ns: Option, + pub retained_bytes: Option, + pub peak_bytes: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineExactMeasurement { + pub id: String, + pub distribution: DistributionDescriptor, + pub environment: EnvironmentDescriptor, + pub query: OfflineQueryDescriptor, + pub measured_at_unix_seconds: u64, + pub valid_until_unix_seconds: u64, + pub provenance: MeasurementProvenance, + pub metrics: ExactResourceMeasurements, +} + +/// The companion format binds otherwise query-agnostic sketch primitives to +/// their measured readout and exact reference. Bindings describe state after +/// ingestion, without merges or intervening updates during the read sequence. +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineComparisonEvidence { + pub schema_version: u32, + /// Every CPU phase excludes other phases and destruction of retained state. + pub timing_contract: String, + pub sketch_evidence: EvidenceArtifact, + pub query_bindings: Vec, + pub exact_records: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct EmpiricalAccuracyRequirement { + pub metric: String, + pub max_observed_mean: f64, + pub minimum_trials: u32, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineWorkload { + pub input_items_per_state: u64, + /// Reads of the fixed, fully ingested snapshot; no updates between reads. + pub reads_per_state: u64, + pub merges_per_state: u64, + pub state_instances: u64, + pub horizon_seconds: f64, +} + +/// Explicit scalarization: CPU ns × cpu_ns_weight + byte-seconds × +/// retained_byte_seconds_weight. Weights must be nonnegative and not both zero. +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct ResourceWeights { + pub cpu_ns_weight: f64, + pub retained_byte_seconds_weight: f64, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct SketchConfiguration { + pub algorithm: SketchAlgorithm, + pub params: SketchParams, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineComparisonRequest { + pub context: EvidenceContext, + pub exact_environment: EnvironmentDescriptor, + pub query: OfflineQueryDescriptor, + pub accuracy: EmpiricalAccuracyRequirement, + pub workload: OfflineWorkload, + pub weights: ResourceWeights, + /// `Some` restricts selection to these algorithms and configurations at + /// least as large as their formally legal deployment parameters. `None` + /// requests a purely offline recommendation, unsuitable for formal binding. + pub formal_minimums: Option>, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OfflineResourceEstimate { + pub cpu_ns: f64, + pub retained_bytes: Option, + pub retained_byte_seconds: Option, + /// Conservative sum of per-state construction/ingestion peaks. + pub peak_bytes_upper_bound: Option, + /// Per-state snapshot sizes, not charged as writes in this in-memory model. + pub serialized_bytes_per_state: Option, + pub disk_bytes_per_state: Option, + pub objective_cost: f64, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OfflineCandidateEstimate { + pub record_id: String, + pub configuration: Option, + pub observed_error_mean: Option, + pub resources: Option, + pub rejection: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OfflineRecommendation { + pub query: OfflineQueryDescriptor, + pub selected: OfflineCandidateEstimate, + pub exact_baseline: OfflineCandidateEstimate, + pub candidates: Vec, + pub estimated_cpu_savings_ns: f64, + pub estimated_retained_bytes_savings: Option, + /// True only if the request supplied and every selected sketch passed + /// explicit formal minima; observed error alone cannot authorize binding. + pub checked_formal_minimums: bool, + pub assumptions: Vec, +} + +impl OfflineRecommendation { + /// An exact selection deliberately returns no sketch. The caller must + /// preserve its exact path; do not silently substitute a default sketch. + pub fn selected_sketch(&self) -> Option<&SketchConfiguration> { + self.selected.configuration.as_ref() + } +} + +/// Compare complete CPU components for a fixed snapshot and retain every +/// unavailable alternative with its reason. Without an applicable exact +/// baseline no benefit can be established, so this returns an error. +pub fn recommend_offline( + evidence: &OfflineComparisonEvidence, + request: &OfflineComparisonRequest, +) -> Result { + validate_request(request)?; + if evidence.schema_version != 1 { + return Err("unsupported offline comparison schema version".into()); + } + if evidence.timing_contract != "disjoint_live_state_v1" { + return Err( + "comparison requires disjoint CPU phases measured with retained state alive".into(), + ); + } + let provider = + EmpiricalEvidenceProvider::new(evidence.sketch_evidence.clone(), request.context.clone()) + .map_err(|e| e.to_string())?; + let mut bindings = std::collections::HashMap::new(); + for binding in &evidence.query_bindings { + if bindings + .insert(&binding.record_id, &binding.query) + .is_some() + { + return Err("duplicate query binding".into()); + } + if !evidence + .sketch_evidence + .records + .iter() + .any(|r| r.id == binding.record_id) + { + return Err("query binding refers to missing record".into()); + } + } + let exact: Vec<_> = evidence + .exact_records + .iter() + .filter(|r| { + r.distribution == request.context.distribution + && r.environment == request.exact_environment + && r.query == request.query + && r.measured_at_unix_seconds <= request.context.now_unix_seconds + && request.context.now_unix_seconds <= r.valid_until_unix_seconds + }) + .collect(); + if exact.len() != 1 { + return Err("missing, stale, incompatible or ambiguous exact baseline".into()); + } + let exact = exact[0]; + validate_exact(exact)?; + let baseline_resources = estimate_exact(exact, request)?; + let exact_baseline = OfflineCandidateEstimate { + record_id: exact.id.clone(), + configuration: None, + observed_error_mean: Some(0.0), + resources: Some(baseline_resources), + rejection: None, + }; + let mut candidates = Vec::new(); + for row in &evidence.sketch_evidence.records { + let mut candidate = OfflineCandidateEstimate { + record_id: row.id.clone(), + configuration: Some(SketchConfiguration { + algorithm: row.algorithm.clone(), + params: row.params.clone(), + }), + observed_error_mean: row.error.as_ref().and_then(|e| e.mean), + resources: None, + rejection: None, + }; + let result = (|| { + let matched = provider + .lookup(&row.algorithm, &row.params) + .map_err(|e| e.to_string())?; + if matched.id != row.id { + return Err("record belongs to another applicability context".into()); + } + if bindings.get(&row.id).copied() != Some(&request.query) { + return Err("missing or incompatible measured query binding".into()); + } + if let Some(minimums) = &request.formal_minimums { + if !minimums.iter().any(|m| { + m.algorithm == row.algorithm && parameters_at_least(&row.params, &m.params) + }) { + return Err( + "configuration does not meet the deployment's formal minimum".into(), + ); + } + } + let error = row + .error + .as_ref() + .ok_or("missing offline error observation")?; + if error.query.get("kind").and_then(|v| v.as_str()) != Some(request.query.kind.as_str()) + || error.query.get("value_type").and_then(|v| v.as_str()) + != Some(request.query.value_type.as_str()) + { + return Err("offline error observation has incompatible readout semantics".into()); + } + if error.metric != request.accuracy.metric + || error.trials < request.accuracy.minimum_trials + { + return Err("incompatible error metric or insufficient offline trials".into()); + } + let mean = error.mean.ok_or("missing observed mean error")?; + if mean > request.accuracy.max_observed_mean { + return Err("observed error exceeds explicit offline acceptance budget".into()); + } + estimate_sketch(row, request) + })(); + match result { + Ok(resources) => candidate.resources = Some(resources), + Err(reason) => candidate.rejection = Some(reason), + } + candidates.push(candidate); + } + let mut selected = exact_baseline.clone(); + for candidate in &candidates { + if let Some(resources) = &candidate.resources { + if resources.objective_cost < selected.resources.as_ref().unwrap().objective_cost { + selected = candidate.clone(); + } + } + } + let baseline = exact_baseline.resources.as_ref().unwrap(); + let chosen = selected.resources.as_ref().unwrap(); + Ok(OfflineRecommendation { query: request.query.clone(), + estimated_cpu_savings_ns: baseline.cpu_ns - chosen.cpu_ns, + estimated_retained_bytes_savings: baseline.retained_bytes.zip(chosen.retained_bytes).map(|(a,b)| a-b), + selected, exact_baseline, candidates, checked_formal_minimums: request.formal_minimums.is_some(), + assumptions: vec![ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges".into(), + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ".into(), + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement".into(), + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only".into(), + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee".into(), + ] }) +} + +fn validate_request(request: &OfflineComparisonRequest) -> Result<(), String> { + let w = &request.workload; + if request.query.kind != "point_frequency" + || request.query.value_type != "i64" + || request.query.probe_set != "all_distinct_keys" + { + return Err("unsupported offline query contract".into()); + } + if request.accuracy.metric.trim().is_empty() + || !nonnegative(request.accuracy.max_observed_mean) + || request.accuracy.minimum_trials == 0 + { + return Err("invalid empirical accuracy requirement".into()); + } + if w.input_items_per_state != request.context.distribution.sample_count + || w.state_instances == 0 + || !w.horizon_seconds.is_finite() + || w.horizon_seconds <= 0.0 + { + return Err( + "workload must match the measured snapshot and have positive states/horizon".into(), + ); + } + if w.merges_per_state != 0 { + return Err("no post-merge error or exact merge baseline was measured".into()); + } + if !nonnegative(request.weights.cpu_ns_weight) + || !nonnegative(request.weights.retained_byte_seconds_weight) + || request.weights.cpu_ns_weight == 0.0 + && request.weights.retained_byte_seconds_weight == 0.0 + { + return Err("invalid resource objective weights".into()); + } + let a = &request.context.environment; + let b = &request.exact_environment; + if a.cpu != b.cpu || a.os != b.os || a.runtime != b.runtime { + return Err( + "sketch and exact measurements must share hardware, OS and benchmark runtime".into(), + ); + } + Ok(()) +} + +fn validate_exact(row: &OfflineExactMeasurement) -> Result<(), String> { + let p = &row.provenance; + if row.id.trim().is_empty() + || [ + &p.command, + &p.dataset, + &p.source_revision, + &row.environment.id, + &row.environment.implementation, + &row.environment.implementation_version, + ] + .iter() + .any(|s| s.trim().is_empty()) + || p.repetitions == 0 + || row.measured_at_unix_seconds > row.valid_until_unix_seconds + { + return Err("invalid exact baseline provenance".into()); + } + let m = &row.metrics; + for measurement in [ + &m.empty_build_cpu_ns, + &m.update_cpu_ns, + &m.prepare_cpu_ns, + &m.read_cpu_ns, + &m.retained_bytes, + &m.peak_bytes, + ] + .into_iter() + .flatten() + { + if !nonnegative(measurement.value) + || measurement.samples == 0 + || measurement.stddev.is_some_and(|s| !nonnegative(s)) + { + return Err("invalid exact baseline measurement".into()); + } + } + Ok(()) +} + +fn charge(measurement: &Option, count: u64, name: &str) -> Result { + if count == 0 { + return Ok(0.0); + } + let value = measurement + .as_ref() + .ok_or_else(|| format!("missing {name}"))? + .value + * count as f64; + if !nonnegative(value) { + return Err(format!("invalid or overflowing {name}")); + } + Ok(value) +} + +fn estimate_sketch( + row: &OfflineMeasurement, + request: &OfflineComparisonRequest, +) -> Result { + let m = &row.metrics; + let w = &request.workload; + let cpu = charge(&m.build_cpu_ns, 1, "empty sketch construction CPU")? + + charge( + &m.update_cpu_ns, + w.input_items_per_state, + "sketch update CPU", + )? + + charge( + &m.read_cpu_ns, + w.reads_per_state, + "query-matched sketch read CPU", + )? + + charge(&m.merge_cpu_ns, w.merges_per_state, "sketch merge CPU")?; + estimate_resources( + cpu, + &m.retained_bytes, + &m.peak_bytes, + m.serialized_bytes.as_ref().map(|m| m.value), + m.disk_bytes.as_ref().map(|m| m.value), + request, + ) +} + +fn estimate_exact( + row: &OfflineExactMeasurement, + request: &OfflineComparisonRequest, +) -> Result { + let m = &row.metrics; + let w = &request.workload; + let cpu = charge(&m.empty_build_cpu_ns, 1, "exact empty construction CPU")? + + charge( + &m.update_cpu_ns, + w.input_items_per_state, + "exact update CPU", + )? + + charge(&m.prepare_cpu_ns, 1, "exact snapshot preparation CPU")? + + charge(&m.read_cpu_ns, w.reads_per_state, "exact read CPU")?; + estimate_resources(cpu, &m.retained_bytes, &m.peak_bytes, None, None, request) +} + +fn estimate_resources( + per_state_cpu: f64, + retained: &Option, + peak: &Option, + serialized: Option, + disk: Option, + request: &OfflineComparisonRequest, +) -> Result { + let count = request.workload.state_instances as f64; + let cpu_ns = per_state_cpu * count; + let retained_bytes = retained.as_ref().map(|m| m.value * count); + let retained_byte_seconds = retained_bytes.map(|v| v * request.workload.horizon_seconds); + let peak_bytes_upper_bound = peak.as_ref().map(|m| m.value * count); + let memory_cost = if request.weights.retained_byte_seconds_weight == 0.0 { + 0.0 + } else { + retained_byte_seconds.ok_or("missing retained memory for weighted resource objective")? + * request.weights.retained_byte_seconds_weight + }; + let objective_cost = cpu_ns * request.weights.cpu_ns_weight + memory_cost; + if [ + Some(cpu_ns), + retained_bytes, + retained_byte_seconds, + peak_bytes_upper_bound, + Some(objective_cost), + ] + .into_iter() + .flatten() + .any(|v| !nonnegative(v)) + { + return Err("overflowing resource estimate".into()); + } + Ok(OfflineResourceEstimate { + cpu_ns, + retained_bytes, + retained_byte_seconds, + peak_bytes_upper_bound, + serialized_bytes_per_state: serialized, + disk_bytes_per_state: disk, + objective_cost, + }) +} + +fn nonnegative(value: f64) -> bool { + value.is_finite() && value >= 0.0 +} + +/// Conservative componentwise dominance for known planner sizing families. +/// A deployment still checks its own catalog/layout constraints before binding. +pub fn parameters_at_least(candidate: &SketchParams, minimum: &SketchParams) -> bool { + match (candidate, minimum) { + (SketchParams::Cms { width: a, depth: b }, SketchParams::Cms { width: c, depth: d }) + | ( + SketchParams::CountSketch { width: a, depth: b }, + SketchParams::CountSketch { width: c, depth: d }, + ) => a >= c && b >= d, + (SketchParams::Kll { k: a }, SketchParams::Kll { k: b }) + | (SketchParams::Kmv { k: a }, SketchParams::Kmv { k: b }) + | (SketchParams::Theta { k: a }, SketchParams::Theta { k: b }) => a >= b, + (SketchParams::Hll { precision: a }, SketchParams::Hll { precision: b }) => a >= b, + (SketchParams::DDSketch { alpha: a }, SketchParams::DDSketch { alpha: b }) => { + a.is_finite() && *a > 0.0 && a <= b + } + ( + SketchParams::CmsWithHeap { + width: a, + depth: b, + heap_size: c, + }, + SketchParams::CmsWithHeap { + width: d, + depth: e, + heap_size: f, + }, + ) + | ( + SketchParams::CountSketchWithHeap { + width: a, + depth: b, + heap_size: c, + }, + SketchParams::CountSketchWithHeap { + width: d, + depth: e, + heap_size: f, + }, + ) => a >= d && b >= e && c >= f, + _ => false, + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn m(value: f64) -> Option { + Some(Measurement { + value, + stddev: None, + samples: 3, + method: Some("synthetic test fixture, not measured".into()), + }) + } + + fn fixture() -> (OfflineComparisonEvidence, OfflineComparisonRequest) { + let mut sketches: EvidenceArtifact = serde_json::from_str(include_str!( + "../tests/data/offline-evidence-synthetic.json" + )) + .unwrap(); + let query = OfflineQueryDescriptor { + kind: "point_frequency".into(), + value_type: "i64".into(), + probe_set: "all_distinct_keys".into(), + }; + let row = &mut sketches.records[0]; + row.metrics.build_cpu_ns = m(1.0); + row.metrics.update_cpu_ns = m(1.0); + row.metrics.read_cpu_ns = m(1.0); + row.metrics.retained_bytes = m(100.0); + row.error.as_mut().unwrap().mean = Some(0.5); + row.error.as_mut().unwrap().query = + serde_json::json!({"kind":"point_frequency","value_type":"i64"}); + let mut wide = row.clone(); + wide.id = "synthetic-wide-cms".into(); + wide.params = SketchParams::Cms { + width: 544, + depth: 5, + }; + wide.metrics.update_cpu_ns = m(2.0); + wide.metrics.retained_bytes = m(200.0); + wide.error.as_mut().unwrap().mean = Some(0.001); + let context = EvidenceContext { + distribution: row.distribution.clone(), + environment: row.environment.clone(), + now_unix_seconds: 150, + }; + let mut exact_environment = row.environment.clone(); + exact_environment.id = "synthetic-exact".into(); + exact_environment.implementation = "synthetic exact baseline".into(); + let exact = OfflineExactMeasurement { + id: "exact".into(), + distribution: row.distribution.clone(), + environment: exact_environment.clone(), + query: query.clone(), + measured_at_unix_seconds: 100, + valid_until_unix_seconds: 200, + provenance: row.provenance.clone(), + metrics: ExactResourceMeasurements { + empty_build_cpu_ns: m(1.0), + update_cpu_ns: m(5.0), + prepare_cpu_ns: m(1000.0), + read_cpu_ns: m(5.0), + retained_bytes: m(1000.0), + peak_bytes: None, + }, + }; + let metric = row.error.as_ref().unwrap().metric.clone(); + sketches.records.push(wide); + let bindings = sketches + .records + .iter() + .map(|r| MeasurementQueryBinding { + record_id: r.id.clone(), + query: query.clone(), + }) + .collect(); + let request = OfflineComparisonRequest { + context, + exact_environment, + query, + accuracy: EmpiricalAccuracyRequirement { + metric, + max_observed_mean: 0.01, + minimum_trials: 1, + }, + workload: OfflineWorkload { + input_items_per_state: 1000, + reads_per_state: 1000, + merges_per_state: 0, + state_instances: 1, + horizon_seconds: 10.0, + }, + weights: ResourceWeights { + cpu_ns_weight: 1.0, + retained_byte_seconds_weight: 0.0, + }, + formal_minimums: None, + }; + ( + OfflineComparisonEvidence { + schema_version: 1, + timing_contract: "disjoint_live_state_v1".into(), + sketch_evidence: sketches, + query_bindings: bindings, + exact_records: vec![exact], + }, + request, + ) + } + + /// Observed acceptance rejects a cheap inaccurate rung and chooses a larger + /// measured configuration, with every CPU component and state counted. + #[test] + fn accuracy_requirement_changes_selected_configuration_and_cost() { + let (evidence, mut request) = fixture(); + request.formal_minimums = Some(vec![SketchConfiguration { + algorithm: SketchAlgorithm::Cms, + params: SketchParams::Cms { + width: 512, + depth: 5, + }, + }]); + let chosen = recommend_offline(&evidence, &request).unwrap(); + assert_eq!(chosen.selected.record_id, "synthetic-wide-cms"); + assert_eq!(chosen.selected.resources.as_ref().unwrap().cpu_ns, 3001.0); + assert_eq!( + chosen.exact_baseline.resources.as_ref().unwrap().cpu_ns, + 11001.0 + ); + assert_eq!(chosen.estimated_cpu_savings_ns, 8000.0); + assert_eq!(chosen.estimated_retained_bytes_savings, Some(800.0)); + assert!(chosen.checked_formal_minimums); + request.formal_minimums = None; + request.accuracy.max_observed_mean = 1.0; + assert_eq!( + recommend_offline(&evidence, &request) + .unwrap() + .selected + .record_id, + "synthetic-test-cms" + ); + } + + /// Missing required measurements and failing observed-error budgets return + /// the applicable exact baseline, never an optimistically free sketch. + #[test] + fn missing_cost_or_failed_error_acceptance_selects_exact() { + let (mut evidence, mut request) = fixture(); + request.accuracy.max_observed_mean = 0.0; + assert!(recommend_offline(&evidence, &request) + .unwrap() + .selected_sketch() + .is_none()); + request.accuracy.max_observed_mean = 0.01; + evidence.sketch_evidence.records[1].metrics.build_cpu_ns = None; + let chosen = recommend_offline(&evidence, &request).unwrap(); + assert!(chosen.selected_sketch().is_none()); + assert!(chosen.candidates[1] + .rejection + .as_ref() + .unwrap() + .contains("construction")); + evidence.exact_records[0].metrics.prepare_cpu_ns = None; + assert!(recommend_offline(&evidence, &request) + .unwrap_err() + .contains("preparation")); + } + + /// Query, environment, snapshot cardinality, metric, trial count and + /// validity are required independently; nearby evidence is not extrapolated. + #[test] + fn applicability_is_checked_before_recommendation() { + let (evidence, request) = fixture(); + for case in ["query", "environment", "cardinality", "expired", "merges"] { + let mut request = request.clone(); + match case { + "query" => request.query.kind = "total_count".into(), + "environment" => request.exact_environment.cpu = "other CPU".into(), + "cardinality" => request.workload.input_items_per_state = 1001, + "expired" => request.context.now_unix_seconds = 201, + "merges" => request.workload.merges_per_state = 1, + _ => unreachable!(), + } + assert!(recommend_offline(&evidence, &request).is_err(), "{case}"); + } + for case in ["metric", "trials", "binding", "readout"] { + let mut evidence = evidence.clone(); + let mut request = request.clone(); + match case { + "metric" => request.accuracy.metric = "rank_error".into(), + "trials" => request.accuracy.minimum_trials = 100, + "binding" => evidence.query_bindings.clear(), + "readout" => { + for row in &mut evidence.sketch_evidence.records { + row.error.as_mut().unwrap().query["kind"] = + serde_json::json!("total_count"); + } + } + _ => unreachable!(), + } + assert!( + recommend_offline(&evidence, &request) + .unwrap() + .selected_sketch() + .is_none(), + "{case}" + ); + } + } + + /// Resource weights have explicit dimensions; missing memory blocks a + /// memory-weighted objective but does not become a zero-memory estimate. + #[test] + fn resource_objective_and_unknown_memory_are_explicit() { + let (mut evidence, mut request) = fixture(); + evidence.sketch_evidence.records[1].metrics.retained_bytes = None; + let chosen = recommend_offline(&evidence, &request).unwrap(); + assert!(chosen.selected.resources.unwrap().retained_bytes.is_none()); + request.weights.retained_byte_seconds_weight = 1.0; + assert!(recommend_offline(&evidence, &request) + .unwrap() + .selected_sketch() + .is_none()); + evidence.sketch_evidence.records[1].metrics.retained_bytes = m(10000.0); + assert!(recommend_offline(&evidence, &request) + .unwrap() + .selected_sketch() + .is_none()); + request.weights.cpu_ns_weight = f64::NAN; + assert!(recommend_offline(&evidence, &request).is_err()); + } + + /// A measured rung below a deployment's formal sizing floor cannot be + /// selected even if its error happened to be zero on the offline input. + #[test] + fn formal_minimums_cannot_be_relaxed_by_observed_accuracy() { + let (evidence, mut request) = fixture(); + request.formal_minimums = Some(vec![SketchConfiguration { + algorithm: SketchAlgorithm::Cms, + params: SketchParams::Cms { + width: 1024, + depth: 5, + }, + }]); + assert!(recommend_offline(&evidence, &request) + .unwrap() + .selected_sketch() + .is_none()); + assert!(!parameters_at_least( + &SketchParams::Cms { + width: 1024, + depth: 4 + }, + &SketchParams::Cms { + width: 512, + depth: 5 + } + )); + assert!(!parameters_at_least( + &SketchParams::CountSketch { + width: 1024, + depth: 5 + }, + &SketchParams::Cms { + width: 512, + depth: 5 + } + )); + } + + /// Consuming-wrapper CPU phases and ambiguous exact generations cannot + /// establish a complete fixed-snapshot comparison. + #[test] + fn comparison_requires_disjoint_phases_and_one_exact_generation() { + let (mut evidence, request) = fixture(); + evidence.timing_contract = "consuming_upstream_wrappers".into(); + assert!(recommend_offline(&evidence, &request) + .unwrap_err() + .contains("disjoint")); + evidence.timing_contract = "disjoint_live_state_v1".into(); + evidence + .exact_records + .push(evidence.exact_records[0].clone()); + assert!(recommend_offline(&evidence, &request) + .unwrap_err() + .contains("ambiguous")); + } +} diff --git a/crates/asap-aware-mapping/src/empirical_cost.rs b/crates/asap-aware-mapping/src/empirical_cost.rs new file mode 100644 index 00000000..58aa158d --- /dev/null +++ b/crates/asap-aware-mapping/src/empirical_cost.rs @@ -0,0 +1,699 @@ +//! Offline sketch-bench evidence. Measurements describe a particular dataset, +//! configuration and environment; they are neither runtime feedback nor proofs +//! of an accuracy guarantee. CPU quantities are nanoseconds, never CPU operations. + +use asap_types::post_asap::{ + GroupingStrategy, SketchAlgorithm, SketchParams, SummaryExpr, SummaryFamilyType, SummaryNode, +}; +use asap_types::pre_asap::AggIntent; +use serde::{Deserialize, Serialize}; + +use crate::cost_model::{Cost, CostModel, DefaultCostModel}; +use crate::replacement::{ + accuracy_budget, accuracy_target, default_size_params, ReplacementSubDAG, TargetSubDAG, +}; +use crate::summary_maintenance_lifecycle::SummaryMaintenanceLifecycleCostInputs; + +pub const EVIDENCE_SCHEMA_VERSION: u32 = 1; +pub const EVIDENCE_MODEL_VERSION: &str = "empirical-update-cpu-v1"; + +/// Field names carry units; `None` means unmeasured, including disk and heap. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct Measurement { + pub value: f64, + pub stddev: Option, + pub samples: u32, + /// Measurement procedure and scope, e.g. counter payload vs allocator heap. + #[serde(default)] + pub method: Option, +} + +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct ResourceMeasurements { + /// Empty sketch construction; ingesting the snapshot is charged separately. + pub build_cpu_ns: Option, + pub update_cpu_ns: Option, + pub merge_cpu_ns: Option, + pub read_cpu_ns: Option, + pub retained_bytes: Option, + pub peak_bytes: Option, + pub serialized_bytes: Option, + pub disk_bytes: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct DistributionDescriptor { + pub id: String, + pub family: String, + pub sample_count: u64, + pub distinct_count: Option, + /// Generator parameters or trace identity/checksum, including sampling rules. + pub parameters: serde_json::Value, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct EnvironmentDescriptor { + pub id: String, + pub cpu: String, + pub os: String, + pub runtime: String, + pub implementation: String, + pub implementation_version: String, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct MeasurementProvenance { + pub command: String, + pub dataset: String, + pub source_revision: String, + pub repetitions: u32, +} + +/// Observed error on offline ground truth. No confidence or formal guarantee is +/// inferred from these statistics; `metric` defines the meaning of mean/max. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineError { + pub metric: String, + pub mean: Option, + pub max: Option, + pub trials: u32, + pub ground_truth_method: String, + pub query: serde_json::Value, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct OfflineMeasurement { + pub id: String, + pub algorithm: SketchAlgorithm, + pub params: SketchParams, + pub distribution: DistributionDescriptor, + pub environment: EnvironmentDescriptor, + pub measured_at_unix_seconds: u64, + pub valid_until_unix_seconds: u64, + pub provenance: MeasurementProvenance, + pub metrics: ResourceMeasurements, + pub error: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct EvidenceArtifact { + pub schema_version: u32, + pub benchmark_version: String, + /// Identity of the normalization/cost interpretation, independent of JSON + /// layout and of the sketch implementation's source revision. + pub model_version: String, + pub records: Vec, +} + +/// The caller explicitly chooses the offline applicability context. Matching +/// all descriptors prevents reusing costs solely because a distribution name +/// or hardware label happens to agree. Time is injected for reproducibility. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct EvidenceContext { + pub distribution: DistributionDescriptor, + pub environment: EnvironmentDescriptor, + pub now_unix_seconds: u64, +} + +#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] +pub enum EvidenceError { + #[error("unsupported offline evidence schema version {0}")] + UnsupportedVersion(u32), + #[error("invalid offline evidence: {0}")] + Invalid(String), + #[error("no measurement for algorithm and exact configuration")] + MissingConfiguration, + #[error("offline distribution or environment is incompatible")] + IncompatibleContext, + #[error("offline measurement is expired or dated in the future")] + Stale, + #[error("multiple applicable measurements; select an unambiguous artifact")] + Ambiguous, +} + +pub struct EmpiricalEvidenceProvider { + artifact: EvidenceArtifact, + context: EvidenceContext, +} + +impl EmpiricalEvidenceProvider { + pub fn new( + artifact: EvidenceArtifact, + context: EvidenceContext, + ) -> Result { + artifact.validate()?; + if artifact.model_version != EVIDENCE_MODEL_VERSION { + return invalid("unsupported offline cost model version"); + } + validate_context(&context.distribution, &context.environment)?; + Ok(Self { artifact, context }) + } + + pub fn artifact(&self) -> &EvidenceArtifact { + &self.artifact + } + pub fn context(&self) -> &EvidenceContext { + &self.context + } + + /// Never interpolates between configurations, distributions, or machines. + /// The returned row includes complete provenance for user explanations. + pub fn lookup( + &self, + algorithm: &SketchAlgorithm, + params: &SketchParams, + ) -> Result<&OfflineMeasurement, EvidenceError> { + let configurations: Vec<_> = self + .artifact + .records + .iter() + .filter(|r| &r.algorithm == algorithm && &r.params == params) + .collect(); + if configurations.is_empty() { + return Err(EvidenceError::MissingConfiguration); + } + let compatible: Vec<_> = configurations + .into_iter() + .filter(|r| { + r.distribution == self.context.distribution + && r.environment == self.context.environment + }) + .collect(); + if compatible.is_empty() { + return Err(EvidenceError::IncompatibleContext); + } + let mut valid = compatible.into_iter().filter(|r| { + r.measured_at_unix_seconds <= self.context.now_unix_seconds + && self.context.now_unix_seconds <= r.valid_until_unix_seconds + }); + let first = valid.next().ok_or(EvidenceError::Stale)?; + if valid.next().is_some() { + return Err(EvidenceError::Ambiguous); + } + Ok(first) + } + + /// Reorders only a fully measured comparison, preserving all candidates. + /// For deployment-specific sizing call `lookup` with those exact params. + pub fn rank_candidates( + &self, + intent: &AggIntent, + candidates: &[SketchAlgorithm], + eps: f64, + delta: f64, + ) -> Vec { + let costs: Option> = candidates + .iter() + .map(|algorithm| { + let params = default_size_params(algorithm.clone(), intent, eps, delta); + self.lookup(algorithm, ¶ms) + .ok()? + .metrics + .update_cpu_ns + .as_ref() + .map(|m| (algorithm.clone(), m.value)) + }) + .collect(); + let Some(mut costs) = costs else { + return candidates.to_vec(); + }; + costs.sort_by(|a, b| a.1.total_cmp(&b.1)); + costs.into_iter().map(|(algorithm, _)| algorithm).collect() + } + + /// Costs for one independently instantiated sketch state, in CPU ns. + /// Unknown retention/retirement remain unavailable; CPU time must not be + /// mixed with an existing deployment's unitless or CPU-operation costs. + pub fn lifecycle_cost_inputs( + &self, + summary: &SummaryNode, + ) -> SummaryMaintenanceLifecycleCostInputs { + let SummaryExpr::SummaryAgg { + family: SummaryFamilyType::Sketch(kind, GroupingStrategy::PerSubpopulationInstance), + grouping: GroupingStrategy::PerSubpopulationInstance, + .. + } = &summary.expr + else { + return SummaryMaintenanceLifecycleCostInputs::default(); + }; + let Ok(row) = self.lookup(kind.algorithm(), kind.params()) else { + return SummaryMaintenanceLifecycleCostInputs::default(); + }; + SummaryMaintenanceLifecycleCostInputs { + build_cost: snapshot_build_cpu(row).map(Cost), + maintenance_cost_per_update: row.metrics.update_cpu_ns.as_ref().map(|m| Cost(m.value)), + // A point-frequency benchmark read does not price a total-count + // or quantile read. There is no query request in this hook. + summary_read_cost: None, + ..Default::default() + } + } +} + +/// Standalone adapter for the existing planner boundary. Empirical data changes +/// candidate discovery order; final structural scores retain their documented +/// default meaning. Complete plan benefit estimates require downstream raw and +/// summary physical evidence and are deliberately not invented here. +pub struct EmpiricalCostModel { + pub provider: EmpiricalEvidenceProvider, +} + +impl EmpiricalCostModel { + pub fn new(provider: EmpiricalEvidenceProvider) -> Self { + Self { provider } + } +} + +impl CostModel for EmpiricalCostModel { + fn rank_candidates( + &self, + intent: &AggIntent, + candidates: &[SketchAlgorithm], + ) -> Vec { + let Some(accuracy) = accuracy_target(intent) else { + return candidates.to_vec(); + }; + let (eps, delta) = accuracy_budget(accuracy); + self.provider + .rank_candidates(intent, candidates, eps, delta) + } + + // The default size_params formula retains its formal guarantee. Observed + // offline error is insufficient evidence to shrink a sketch safely. + fn estimate_cost(&self, candidate: &ReplacementSubDAG, target: &TargetSubDAG<'_>) -> f64 { + DefaultCostModel.estimate_cost(candidate, target) + } + + fn summary_maintenance_lifecycle_cost_inputs( + &self, + summary: &SummaryNode, + ) -> SummaryMaintenanceLifecycleCostInputs { + self.provider.lifecycle_cost_inputs(summary) + } +} + +impl EvidenceArtifact { + pub fn validate(&self) -> Result<(), EvidenceError> { + if self.schema_version != EVIDENCE_SCHEMA_VERSION { + return Err(EvidenceError::UnsupportedVersion(self.schema_version)); + } + if self.benchmark_version.trim().is_empty() || self.model_version.trim().is_empty() { + return invalid("missing benchmark or model version"); + } + let mut ids = std::collections::HashSet::new(); + for row in &self.records { + if row.id.trim().is_empty() || !ids.insert(&row.id) { + return invalid("empty or duplicate record id"); + } + validate_context(&row.distribution, &row.environment)?; + let p = &row.provenance; + if [&p.command, &p.dataset, &p.source_revision] + .iter() + .any(|s| s.trim().is_empty()) + || p.repetitions == 0 + { + return invalid("missing measurement provenance"); + } + if row.measured_at_unix_seconds > row.valid_until_unix_seconds { + return invalid("reversed validity interval"); + } + if !valid_params(&row.algorithm, &row.params) { + return invalid("invalid or mismatched sketch parameters"); + } + let m = &row.metrics; + for measurement in [ + &m.build_cpu_ns, + &m.update_cpu_ns, + &m.merge_cpu_ns, + &m.read_cpu_ns, + &m.retained_bytes, + &m.peak_bytes, + &m.serialized_bytes, + &m.disk_bytes, + ] + .into_iter() + .flatten() + { + if !nonnegative(measurement.value) + || measurement.samples == 0 + || measurement.stddev.is_some_and(|v| !nonnegative(v)) + { + return invalid("invalid measurement or uncertainty"); + } + } + if let Some(error) = &row.error { + if error.metric.trim().is_empty() + || error.ground_truth_method.trim().is_empty() + || error.trials == 0 + || [error.mean, error.max] + .into_iter() + .flatten() + .any(|v| !nonnegative(v)) + { + return invalid("invalid offline error evidence"); + } + } + } + Ok(()) + } +} + +fn invalid(message: &str) -> Result { + Err(EvidenceError::Invalid(message.into())) +} +fn nonnegative(value: f64) -> bool { + value.is_finite() && value >= 0.0 +} + +fn snapshot_build_cpu(row: &OfflineMeasurement) -> Option { + let cpu = row.metrics.build_cpu_ns.as_ref()?.value + + row.metrics.update_cpu_ns.as_ref()?.value * row.distribution.sample_count as f64; + nonnegative(cpu).then_some(cpu) +} + +fn validate_context( + distribution: &DistributionDescriptor, + environment: &EnvironmentDescriptor, +) -> Result<(), EvidenceError> { + if [ + &distribution.id, + &distribution.family, + &environment.id, + &environment.cpu, + &environment.os, + &environment.runtime, + &environment.implementation, + &environment.implementation_version, + ] + .iter() + .any(|s| s.trim().is_empty()) + { + return invalid("missing distribution or environment identity"); + } + if distribution.sample_count == 0 + || distribution + .distinct_count + .is_some_and(|n| n > distribution.sample_count) + || !distribution.parameters.is_object() + { + return invalid("invalid distribution descriptors"); + } + Ok(()) +} + +fn valid_params(algorithm: &SketchAlgorithm, params: &SketchParams) -> bool { + match (algorithm, params) { + (SketchAlgorithm::Kll, SketchParams::Kll { k }) + | (SketchAlgorithm::Kmv, SketchParams::Kmv { k }) + | (SketchAlgorithm::Theta, SketchParams::Theta { k }) => *k > 0, + (SketchAlgorithm::Hll, SketchParams::Hll { precision }) => (4..=18).contains(precision), + (SketchAlgorithm::DDSketch, SketchParams::DDSketch { alpha }) => { + alpha.is_finite() && *alpha > 0.0 && *alpha < 1.0 + } + (SketchAlgorithm::Cms, SketchParams::Cms { width, depth }) + | (SketchAlgorithm::CountSketch, SketchParams::CountSketch { width, depth }) => { + *width > 0 && *depth > 0 + } + ( + SketchAlgorithm::CmsWithHeap, + SketchParams::CmsWithHeap { + width, + depth, + heap_size, + }, + ) + | ( + SketchAlgorithm::CountSketchWithHeap, + SketchParams::CountSketchWithHeap { + width, + depth, + heap_size, + }, + ) => *width > 0 && *depth > 0 && *heap_size > 0, + _ => false, + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::replacement::{implementations_for_with, Implementation}; + use asap_types::types::AccuracyTarget; + + /// The documented synthetic wire-format example remains importable and + /// explicitly identifiable as a test fixture. + #[test] + fn checked_in_synthetic_example_is_valid() { + let artifact: EvidenceArtifact = serde_json::from_str(include_str!( + "../tests/data/offline-evidence-synthetic.json" + )) + .unwrap(); + artifact.validate().unwrap(); + assert!(artifact.records[0] + .environment + .implementation + .contains("SYNTHETIC")); + let schema: serde_json::Value = serde_json::from_str(include_str!( + "../../../docs/developer_docs/offline-sketch-evidence.schema.json" + )) + .unwrap(); + assert_eq!( + schema["properties"]["schema_version"]["const"], + artifact.schema_version + ); + assert_eq!( + schema["properties"]["model_version"]["const"], + EVIDENCE_MODEL_VERSION + ); + } + + /// Lifecycle build includes all measured snapshot updates, not just an empty + /// allocation. A missing update measurement cannot become free ingestion. + #[test] + fn lifecycle_build_requires_complete_snapshot_ingestion() { + let (mut artifact, _, _) = fixture(); + let row = &mut artifact.records[0]; + row.metrics.build_cpu_ns = Some(Measurement { + value: 10.0, + stddev: None, + samples: 1, + method: None, + }); + assert_eq!(snapshot_build_cpu(row), Some(20010.0)); + row.metrics.update_cpu_ns = None; + assert_eq!(snapshot_build_cpu(row), None); + } + + fn fixture() -> (EvidenceArtifact, EvidenceContext, AggIntent) { + let distribution = DistributionDescriptor { + id: "unit-test-uniform".into(), + family: "uniform".into(), + sample_count: 1000, + distinct_count: Some(100), + parameters: serde_json::json!({"seed": 7}), + }; + let environment = EnvironmentDescriptor { + id: "unit-test-machine".into(), + cpu: "test CPU".into(), + os: "test OS".into(), + runtime: "test runtime".into(), + implementation: "synthetic test fixture".into(), + implementation_version: "test-v1".into(), + }; + let intent = AggIntent::Count { + accuracy: AccuracyTarget::EpsilonDelta { + epsilon: 0.01, + delta: 0.01, + }, + }; + let records = [ + (SketchAlgorithm::Cms, 20.0), + (SketchAlgorithm::CountSketch, 10.0), + ] + .into_iter() + .map(|(algorithm, cost)| OfflineMeasurement { + id: format!("test-{algorithm:?}"), + params: default_size_params(algorithm.clone(), &intent, 0.01, 0.01), + algorithm, + distribution: distribution.clone(), + environment: environment.clone(), + measured_at_unix_seconds: 100, + valid_until_unix_seconds: 200, + provenance: MeasurementProvenance { + command: "unit test fixture; not a measured benchmark".into(), + dataset: "synthetic fixture".into(), + source_revision: "test".into(), + repetitions: 3, + }, + metrics: ResourceMeasurements { + update_cpu_ns: Some(Measurement { + value: cost, + stddev: Some(1.0), + samples: 3, + method: None, + }), + ..Default::default() + }, + error: Some(OfflineError { + metric: "mean absolute relative frequency error".into(), + mean: Some(0.001), + max: None, + trials: 3, + ground_truth_method: "test exact counter fixture".into(), + query: serde_json::json!({"kind":"point_frequency"}), + }), + }) + .collect(); + ( + EvidenceArtifact { + schema_version: EVIDENCE_SCHEMA_VERSION, + benchmark_version: "test-fixture-v1".into(), + model_version: "empirical-update-cpu-v1".into(), + records, + }, + EvidenceContext { + distribution, + environment, + now_unix_seconds: 150, + }, + intent, + ) + } + + /// Real replacement generation follows measured update ranking while keeping + /// every candidate and the same formally sized parameter configurations. + #[test] + fn public_cost_model_changes_replacement_order_without_changing_guarantees() { + let (artifact, context, intent) = fixture(); + let model = + EmpiricalCostModel::new(EmpiricalEvidenceProvider::new(artifact, context).unwrap()); + let default = implementations_for_with(&intent, &DefaultCostModel); + let measured = implementations_for_with(&intent, &model); + assert_eq!(default.len(), measured.len()); + let Implementation::Sketch(first_default) = &default[0] else { + panic!("expected sketch") + }; + let Implementation::Sketch(first_measured) = &measured[0] else { + panic!("expected sketch") + }; + assert_eq!(first_default.algorithm(), &SketchAlgorithm::Cms); + assert_eq!(first_measured.algorithm(), &SketchAlgorithm::CountSketch); + for candidate in &measured { + assert!(default.contains(candidate)); + } + assert_eq!( + model.size_params(SketchAlgorithm::Cms, &intent, 0.001, 0.001), + DefaultCostModel.size_params(SketchAlgorithm::Cms, &intent, 0.001, 0.001) + ); + } + + /// Missing, mismatched and expired evidence preserve the original ranking; + /// a measurement from another configuration is never extrapolated. + #[test] + fn unavailable_evidence_falls_back_with_specific_reasons() { + let (artifact, context, intent) = fixture(); + let candidates = vec![SketchAlgorithm::Cms, SketchAlgorithm::CountSketch]; + for (mut evidence, mut request, expected) in [ + ( + artifact.clone(), + context.clone(), + EvidenceError::MissingConfiguration, + ), + ( + artifact.clone(), + context.clone(), + EvidenceError::IncompatibleContext, + ), + (artifact.clone(), context.clone(), EvidenceError::Stale), + ] { + match expected { + EvidenceError::MissingConfiguration => { + evidence.records.remove(1); + } + EvidenceError::IncompatibleContext => { + request.distribution.parameters = serde_json::json!({"seed":8}); + } + EvidenceError::Stale => { + request.now_unix_seconds = 201; + } + _ => unreachable!(), + } + let provider = EmpiricalEvidenceProvider::new(evidence, request).unwrap(); + assert_eq!( + provider + .lookup(&artifact.records[1].algorithm, &artifact.records[1].params) + .unwrap_err(), + expected + ); + assert_eq!( + provider.rank_candidates(&intent, &candidates, 0.01, 0.01), + candidates + ); + } + let provider = EmpiricalEvidenceProvider::new(artifact, context).unwrap(); + assert_eq!( + provider.rank_candidates(&intent, &candidates, 0.001, 0.01), + candidates + ); + } + + /// Null remains unknown across serialization; zero is accepted only as an + /// explicit valid measurement, and no point-frequency error becomes a bound. + #[test] + fn serialization_preserves_unknown_zero_and_provenance() { + let (mut artifact, context, _) = fixture(); + artifact.records[0].metrics.disk_bytes = Some(Measurement { + value: 0.0, + stddev: None, + samples: 1, + method: None, + }); + let decoded: EvidenceArtifact = + serde_json::from_str(&serde_json::to_string(&artifact).unwrap()).unwrap(); + let provider = EmpiricalEvidenceProvider::new(decoded, context).unwrap(); + let row = provider + .lookup(&artifact.records[0].algorithm, &artifact.records[0].params) + .unwrap(); + assert!(row.metrics.peak_bytes.is_none()); + assert_eq!(row.metrics.disk_bytes.as_ref().unwrap().value, 0.0); + assert_eq!(row.provenance, artifact.records[0].provenance); + assert_eq!(row.error.as_ref().unwrap().query["kind"], "point_frequency"); + } + + /// Malformed values, schema versions and ambiguous live records cannot + /// silently become plausible costs. + #[test] + fn invalid_and_ambiguous_artifacts_are_rejected() { + let (artifact, context, _) = fixture(); + let mut bad = artifact.clone(); + bad.schema_version = 2; + assert_eq!(bad.validate(), Err(EvidenceError::UnsupportedVersion(2))); + let mut bad = artifact.clone(); + bad.records[0].metrics.update_cpu_ns.as_mut().unwrap().value = f64::NAN; + assert!(bad.validate().is_err()); + let mut bad = artifact.clone(); + bad.records[0].params = SketchParams::Hll { precision: 14 }; + assert!(bad.validate().is_err()); + let mut bad = artifact.clone(); + bad.records[0].provenance.repetitions = 0; + assert!(bad.validate().is_err()); + let mut duplicate = artifact.records[0].clone(); + duplicate.id = "another-live-measurement".into(); + let mut ambiguous = artifact.clone(); + ambiguous.records.push(duplicate); + let provider = EmpiricalEvidenceProvider::new(ambiguous, context).unwrap(); + assert_eq!( + provider.lookup(&artifact.records[0].algorithm, &artifact.records[0].params), + Err(EvidenceError::Ambiguous) + ); + } +} diff --git a/crates/asap-aware-mapping/src/lib.rs b/crates/asap-aware-mapping/src/lib.rs index 12654b82..9c45b397 100644 --- a/crates/asap-aware-mapping/src/lib.rs +++ b/crates/asap-aware-mapping/src/lib.rs @@ -185,6 +185,8 @@ pub mod accuracy; pub mod accuracy_reconciliation; pub mod analytical_cost; pub mod cost_model; +pub mod empirical_cost; +pub mod empirical_comparison; pub mod explanation; pub mod grouping; pub mod physical_operator_statistics; diff --git a/crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json b/crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json new file mode 100644 index 00000000..77d06194 --- /dev/null +++ b/crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json @@ -0,0 +1,67 @@ +{ + "schema_version": 1, + "benchmark_version": "synthetic-fixture-v1", + "model_version": "empirical-update-cpu-v1", + "records": [ + { + "id": "synthetic-test-cms", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "synthetic-test-uniform", + "family": "uniform", + "sample_count": 1000, + "distinct_count": 100, + "parameters": { + "seed": 42 + } + }, + "environment": { + "id": "synthetic-test-machine", + "cpu": "synthetic CPU", + "os": "synthetic OS", + "runtime": "synthetic runtime", + "implementation": "SYNTHETIC TEST FIXTURE, NOT MEASURED", + "implementation_version": "test-v1" + }, + "measured_at_unix_seconds": 100, + "valid_until_unix_seconds": 200, + "provenance": { + "command": "synthetic fixture; no benchmark was run", + "dataset": "synthetic fixture", + "source_revision": "test-fixture-v1", + "repetitions": 3 + }, + "metrics": { + "build_cpu_ns": null, + "update_cpu_ns": { + "value": 20, + "stddev": 1, + "samples": 3, + "method": "fabricated values for schema/integration tests only" + }, + "merge_cpu_ns": null, + "read_cpu_ns": null, + "retained_bytes": null, + "peak_bytes": null, + "serialized_bytes": null, + "disk_bytes": null + }, + "error": { + "metric": "absolute relative frequency error (dimensionless)", + "mean": 0.001, + "max": null, + "trials": 3, + "ground_truth_method": "synthetic fixture only", + "query": { + "kind": "point_frequency" + } + } + } + ] +} diff --git a/docs/developer_docs/offline-comparison-evidence.schema.json b/docs/developer_docs/offline-comparison-evidence.schema.json new file mode 100644 index 00000000..52c0a5d9 --- /dev/null +++ b/docs/developer_docs/offline-comparison-evidence.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ASAPPlanner fixed-snapshot offline comparison evidence", + "description": "Disjoint CPU phases while state remains alive; no runtime guarantee or live-stream extrapolation.", + "type": "object", + "additionalProperties": false, + "properties": { + "schema_version": { + "const": 1 + }, + "timing_contract": { + "const": "disjoint_live_state_v1" + }, + "sketch_evidence": { + "$ref": "offline-sketch-evidence.schema.json" + }, + "query_bindings": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "record_id": { + "type": "string", + "minLength": 1 + }, + "query": { + "$ref": "#/$defs/query" + } + }, + "required": [ + "record_id", + "query" + ] + } + }, + "exact_records": { + "type": "array", + "items": { + "$ref": "#/$defs/exact" + } + } + }, + "required": [ + "schema_version", + "timing_contract", + "sketch_evidence", + "query_bindings", + "exact_records" + ], + "$defs": { + "query": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "value_type", + "probe_set" + ], + "properties": { + "kind": { + "const": "point_frequency" + }, + "value_type": { + "const": "i64" + }, + "probe_set": { + "const": "all_distinct_keys" + } + } + }, + "exact": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "distribution": { + "$ref": "offline-sketch-evidence.schema.json#/$defs/distribution" + }, + "environment": { + "$ref": "offline-sketch-evidence.schema.json#/$defs/environment" + }, + "query": { + "$ref": "#/$defs/query" + }, + "measured_at_unix_seconds": { + "type": "integer", + "minimum": 0 + }, + "valid_until_unix_seconds": { + "type": "integer", + "minimum": 0 + }, + "provenance": { + "$ref": "offline-sketch-evidence.schema.json#/$defs/provenance" + }, + "metrics": { + "type": "object", + "additionalProperties": false, + "properties": { + "empty_build_cpu_ns": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "update_cpu_ns": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "prepare_cpu_ns": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "read_cpu_ns": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "retained_bytes": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "peak_bytes": { + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + } + }, + "required": [] + } + }, + "required": [ + "id", + "distribution", + "environment", + "query", + "measured_at_unix_seconds", + "valid_until_unix_seconds", + "provenance", + "metrics" + ] + } + } +} diff --git a/docs/developer_docs/offline-sketch-evidence.md b/docs/developer_docs/offline-sketch-evidence.md new file mode 100644 index 00000000..9e0fad60 --- /dev/null +++ b/docs/developer_docs/offline-sketch-evidence.md @@ -0,0 +1,124 @@ +# Consuming offline sketch measurements + +This document is for developers integrating sketch-bench with the planner. The +Rust schema is `asap_aware_mapping::empirical_cost::EvidenceArtifact`; its JSON +schema version is `1`. Required artifact-level `benchmark_version` and +`model_version` identify the producer and cost interpretation independently of +the serialization schema. The benchmark adapter in `tools/empirical-bench` produces +artifacts from actual offline runs. + +The checked-in [JSON Schema](offline-sketch-evidence.schema.json) describes the +wire format. `crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json` +is an explicitly fabricated format fixture, never benchmark evidence. Runtime +validation additionally checks cross-field constraints and matching context. + +Deserialize an artifact and an `EvidenceContext`, then construct an +`EmpiricalEvidenceProvider::new(artifact, context)`. Construction validates schema +version, configuration, provenance and numeric values. `lookup(algorithm, params)` +requires identical sketch parameters, distribution descriptors and environment +descriptors. The context supplies the evaluation timestamp. An expired, future, +missing, incompatible or ambiguous measurement returns a typed error; none of +these conditions supplies a zero cost. Select an explicit context for each +distribution or machine; the provider does not interpolate between datasets. + +Each resource is an optional `Measurement` with `value`, optional `stddev`, +`samples`, and optional `method`. CPU fields are process CPU nanoseconds per +operation; `build_cpu_ns` measures empty construction. Building an ingested +snapshot additionally requires `sample_count × update_cpu_ns`; the lifecycle +helper returns that sum only when both measurements exist. Memory and disk +fields are bytes. Producer methods must state what +was measured and how normalization was performed. `retained_bytes` is distinct +from `peak_bytes`, `serialized_bytes`, and `disk_bytes`. Counter payload size +does not establish allocator footprint, process RSS or on-disk storage. Absent +measurements serialize as null. `stddev: null` means uncertainty was not measured, +not that variability is zero. A zero measurement must have actual evidence. + +The record retains the complete command, dataset identity, implementation +revision, environment and repetition count. Distribution parameters should +include generator configuration and seed, or trace checksum and sampling rules. +Validity intervals are supplied by the producer or deployment policy; they are +an explicit applicability assumption, not a measured property. + +`EmpiricalCostModel` implements the planner's existing `CostModel` boundary. +It derives the planner's default parameter configurations for the requested +accuracy, and orders algorithms by mean measured update CPU only when all +candidates have applicable measurements. Otherwise it preserves discovery order. +It returns every candidate and keeps default sizing. Its final candidate scores +retain `DefaultCostModel`'s dimensionless structural meaning; do not label those +scores as CPU or measured savings. + +Deployment cost models can own the provider and call `lookup` with their own +parameter sizing. This preserves the deployment's other cost and capability +hooks. The provider's lifecycle helper returns available build/update CPU costs +for a single independently instantiated state. It deliberately leaves retention, +retirement and read costs unknown. In particular, a point-frequency benchmark +read does not price a total-count read, even when both use CMS. A deployment must +match readout semantics and supply the missing lifecycle and raw-query evidence +before selecting and pricing a complete physical plan. Never combine these +nanosecond costs with CPU operation counts without explicit calibration. + +`error` contains offline observed statistics and a query descriptor. Its metric +name defines what mean/max refer to; null max does not imply a per-key maximum +was measured. Query semantics and error metrics must agree before the evidence +is shown as applicable to a planner query. Offline frequency error does not +establish total-count or quantile error. The adapter never converts observed +errors into formal accuracy guarantees or runtime feedback, and never shrinks +parameters solely because one dataset had low observed error. + +## Query-matched offline recommendations + +`empirical_comparison::recommend_offline` consumes the companion +[`OfflineComparisonEvidence` JSON format](offline-comparison-evidence.schema.json). +This combines the sketch artifact with explicit query bindings and a separately +identified exact implementation measured on the same machine, OS, runtime and +input distribution. Its `disjoint_live_state_v1` timing contract requires +construction, ingestion, exact preparation and read CPU to be timed separately +with retained state alive. The original upstream consuming-wrapper timings must +not be passed as these disjoint phase measurements. + +`MeasurementQueryBinding` is the producer's explicit assertion identifying the +read/error probe population. The consumer checks that binding and the error +record's readout kind/value type; it cannot recover or certify the original +probe set from an aggregate error number alone. + +The supported workload is an immutable i64 point-frequency snapshot, fully +ingested before a sequence of reads from its measured all-distinct-key probe +population. Each state's input size must equal the measured distribution's sample +count. The model multiplies per-state quantities by the number of identical, +independent state instances. Reads use the measured average over this probe +population; arbitrary keys outside that population are not covered. It does not +estimate sliding windows, interleaved updates, post-merge error, persistence CPU +or retirement. Nonzero merges are explicitly unavailable until matching +post-merge error and an exact merge baseline exist. + +The caller supplies an `EmpiricalAccuracyRequirement`: the exact observed error +metric, maximum accepted mean, and minimum number of offline trials. This is +separate from `AccuracyTarget`. Every candidate must match the readout descriptor, +error metric, trial count and all ordinary distribution/configuration/environment +checks. A zero observed error is neither proof of exactness nor a per-key bound. + +For each compatible sketch, CPU is empty construction plus input count times +update CPU plus read count times read CPU. The exact reference also includes one +complete prepare pass. The comparison ends with retained state. These measured +components produce an estimate of the specified execution sequence, not a newly +measured end-to-end runtime. Unknown required costs reject an alternative. The +objective weights CPU nanoseconds and retained byte-seconds explicitly; unknown +memory cannot be used with a nonzero memory weight. Peak requested allocations +and per-state snapshot disk/serialized sizes remain separate optional reported +dimensions. The disk size does not imply that the modeled workload writes files. + +The result retains every rejected candidate and reason, the exact reference, +selected configuration, and dimensional savings. If no sketch both meets the +offline criterion and beats the exact reference, the exact path wins. If the +exact baseline is missing, stale or incompatible, no benefit recommendation is +available. + +Deployments connecting this result to formal planning supply +`formal_minimums: Some(...)`, computed by their existing sizing formulas. +Selection only admits supported algorithms and configurations that dominate +those minima. `parameters_at_least` is a conservative componentwise check; +deployment-specific layout constraints, including power-of-two widths, remain +the deployment's responsibility. `selected_sketch() == None` means preserve the +exact path. A deployment must additionally match its actual point-frequency +query; a CMS configuration match does not authorize applying these error +observations to PromQL `count_over_time` or bare total counts. diff --git a/docs/developer_docs/offline-sketch-evidence.schema.json b/docs/developer_docs/offline-sketch-evidence.schema.json new file mode 100644 index 00000000..732de8b3 --- /dev/null +++ b/docs/developer_docs/offline-sketch-evidence.schema.json @@ -0,0 +1,774 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ASAPPlanner offline sketch evidence v1", + "description": "Offline observations only. Runtime validation additionally checks duplicate IDs, validity intervals, finite numbers, sample cardinalities and contextual applicability.", + "type": "object", + "additionalProperties": false, + "properties": { + "schema_version": { + "const": 1 + }, + "benchmark_version": { + "type": "string", + "minLength": 1 + }, + "model_version": { + "const": "empirical-update-cpu-v1" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/$defs/record" + } + } + }, + "required": [ + "schema_version", + "benchmark_version", + "model_version", + "records" + ], + "$defs": { + "measurement": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "number", + "minimum": 0 + }, + "stddev": { + "anyOf": [ + { + "type": "number", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "samples": { + "type": "integer", + "minimum": 1 + }, + "method": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "value", + "samples" + ] + }, + "distribution": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "family": { + "type": "string", + "minLength": 1 + }, + "sample_count": { + "type": "integer", + "minimum": 1 + }, + "distinct_count": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "parameters": { + "type": "object" + } + }, + "required": [ + "id", + "family", + "sample_count", + "parameters" + ] + }, + "environment": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "cpu": { + "type": "string", + "minLength": 1 + }, + "os": { + "type": "string", + "minLength": 1 + }, + "runtime": { + "type": "string", + "minLength": 1 + }, + "implementation": { + "type": "string", + "minLength": 1 + }, + "implementation_version": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "id", + "cpu", + "os", + "runtime", + "implementation", + "implementation_version" + ] + }, + "provenance": { + "type": "object", + "additionalProperties": false, + "properties": { + "command": { + "type": "string", + "minLength": 1 + }, + "dataset": { + "type": "string", + "minLength": 1 + }, + "source_revision": { + "type": "string", + "minLength": 1 + }, + "repetitions": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "command", + "dataset", + "source_revision", + "repetitions" + ] + }, + "metrics": { + "type": "object", + "additionalProperties": false, + "properties": { + "build_cpu_ns": { + "description": "Empty sketch construction CPU nanoseconds; full snapshot build additionally charges sample_count times update_cpu_ns.", + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "update_cpu_ns": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "merge_cpu_ns": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "read_cpu_ns": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "retained_bytes": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "peak_bytes": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "serialized_bytes": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "disk_bytes": { + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + } + }, + "required": [] + }, + "error": { + "type": "object", + "additionalProperties": false, + "properties": { + "metric": { + "type": "string", + "minLength": 1 + }, + "mean": { + "anyOf": [ + { + "type": "number", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "max": { + "anyOf": [ + { + "type": "number", + "minimum": 0 + }, + { + "type": "null" + } + ] + }, + "trials": { + "type": "integer", + "minimum": 1 + }, + "ground_truth_method": { + "type": "string", + "minLength": 1 + }, + "query": {} + }, + "required": [ + "metric", + "trials", + "ground_truth_method", + "query" + ] + }, + "record": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "algorithm": { + "enum": [ + "Kll", + "Cms", + "Hll", + "DDSketch", + "CmsWithHeap", + "Kmv", + "Theta", + "CountSketch", + "CountSketchWithHeap" + ] + }, + "params": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "Kll": { + "type": "object", + "additionalProperties": false, + "properties": { + "k": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "k" + ] + } + }, + "required": [ + "Kll" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "Cms": { + "type": "object", + "additionalProperties": false, + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "depth": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "width", + "depth" + ] + } + }, + "required": [ + "Cms" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "Hll": { + "type": "object", + "additionalProperties": false, + "properties": { + "precision": { + "type": "integer", + "minimum": 4, + "maximum": 18 + } + }, + "required": [ + "precision" + ] + } + }, + "required": [ + "Hll" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "DDSketch": { + "type": "object", + "additionalProperties": false, + "properties": { + "alpha": { + "type": "number", + "exclusiveMinimum": 0, + "exclusiveMaximum": 1 + } + }, + "required": [ + "alpha" + ] + } + }, + "required": [ + "DDSketch" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "CmsWithHeap": { + "type": "object", + "additionalProperties": false, + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "depth": { + "type": "integer", + "minimum": 1 + }, + "heap_size": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "width", + "depth", + "heap_size" + ] + } + }, + "required": [ + "CmsWithHeap" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "Kmv": { + "type": "object", + "additionalProperties": false, + "properties": { + "k": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "k" + ] + } + }, + "required": [ + "Kmv" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "Theta": { + "type": "object", + "additionalProperties": false, + "properties": { + "k": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "k" + ] + } + }, + "required": [ + "Theta" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "CountSketch": { + "type": "object", + "additionalProperties": false, + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "depth": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "width", + "depth" + ] + } + }, + "required": [ + "CountSketch" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "CountSketchWithHeap": { + "type": "object", + "additionalProperties": false, + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "depth": { + "type": "integer", + "minimum": 1 + }, + "heap_size": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "width", + "depth", + "heap_size" + ] + } + }, + "required": [ + "CountSketchWithHeap" + ] + } + ] + }, + "distribution": { + "$ref": "#/$defs/distribution" + }, + "environment": { + "$ref": "#/$defs/environment" + }, + "measured_at_unix_seconds": { + "type": "integer", + "minimum": 0 + }, + "valid_until_unix_seconds": { + "type": "integer", + "minimum": 0 + }, + "provenance": { + "$ref": "#/$defs/provenance" + }, + "metrics": { + "$ref": "#/$defs/metrics" + }, + "error": { + "anyOf": [ + { + "$ref": "#/$defs/error" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id", + "algorithm", + "params", + "distribution", + "environment", + "measured_at_unix_seconds", + "valid_until_unix_seconds", + "provenance", + "metrics" + ], + "allOf": [ + { + "if": { + "properties": { + "algorithm": { + "const": "Kll" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "Kll" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "Cms" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "Cms" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "Hll" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "Hll" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "DDSketch" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "DDSketch" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "CmsWithHeap" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "CmsWithHeap" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "Kmv" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "Kmv" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "Theta" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "Theta" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "CountSketch" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "CountSketch" + ] + } + } + } + }, + { + "if": { + "properties": { + "algorithm": { + "const": "CountSketchWithHeap" + } + } + }, + "then": { + "properties": { + "params": { + "required": [ + "CountSketchWithHeap" + ] + } + } + } + } + ] + } + } +} From f6c46ce7aae497ca5f9f507dd520207932e680b2 Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:21:43 -0600 Subject: [PATCH 2/9] feat(bench): add offline sketch sweeps and scoped o11y evaluation --- Cargo.lock | 2 + crates/devtools/Cargo.toml | 2 + crates/devtools/src/bin/o11y_exact_bench.rs | 358 +++++++++++++ crates/devtools/src/bin/o11y_replay.rs | 495 ++++++++++++++++++ crates/devtools/src/bin/offline_recommend.rs | 28 + .../empirical-o11y-execution-plan.md | 60 +++ docs/offline-o11y-evaluation-2026-09-08.md | 111 ++++ docs/offline-o11y-final-2026-09-08.md | 74 +++ docs/user-guide/o11y-replay.md | 103 ++++ tools/empirical-bench/README.md | 110 ++++ tools/empirical-bench/memory_probe.rs | 101 ++++ tools/empirical-bench/resource_probe.rs | 138 +++++ tools/empirical-bench/run.py | 367 +++++++++++++ tools/empirical-bench/test_export.py | 51 ++ 14 files changed, 2000 insertions(+) create mode 100644 crates/devtools/src/bin/o11y_exact_bench.rs create mode 100644 crates/devtools/src/bin/o11y_replay.rs create mode 100644 crates/devtools/src/bin/offline_recommend.rs create mode 100644 docs/design_docs/empirical-o11y-execution-plan.md create mode 100644 docs/offline-o11y-evaluation-2026-09-08.md create mode 100644 docs/offline-o11y-final-2026-09-08.md create mode 100644 docs/user-guide/o11y-replay.md create mode 100644 tools/empirical-bench/README.md create mode 100644 tools/empirical-bench/memory_probe.rs create mode 100644 tools/empirical-bench/resource_probe.rs create mode 100644 tools/empirical-bench/run.py create mode 100644 tools/empirical-bench/test_export.py diff --git a/Cargo.lock b/Cargo.lock index 34f106da..2fe45ad6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,6 +320,8 @@ dependencies = [ "asap-frontend-promql", "asap-frontend-sql", "asap-types", + "libc", + "regex", "serde", "serde_json", "serde_yaml", diff --git a/crates/devtools/Cargo.toml b/crates/devtools/Cargo.toml index 0abc8ccd..748fae18 100644 --- a/crates/devtools/Cargo.toml +++ b/crates/devtools/Cargo.toml @@ -19,4 +19,6 @@ asap-types = { path = "../types" } serde = { version = "1", features = ["derive"] } serde_json = "1" serde_yaml = "0.9" +libc = "0.2" +regex = "1" tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread"] } diff --git a/crates/devtools/src/bin/o11y_exact_bench.rs b/crates/devtools/src/bin/o11y_exact_bench.rs new file mode 100644 index 00000000..890386b9 --- /dev/null +++ b/crates/devtools/src/bin/o11y_exact_bench.rs @@ -0,0 +1,358 @@ +//! Fixed-snapshot exact summary profiling for a deliberately bounded o11y subset. +use std::{hint::black_box, rc::Rc}; + +use asap_aware_mapping::cost_model::Cost; +use asap_aware_mapping::{ + default_strategies_with, search_workload_with_targets, CostModel, DefaultAccuracyModel, + DefaultCostModel, Replacement, ReplacementStrategy, ReplacementSubDAG, SketchAlgorithmStrategy, + TargetSubDAG, +}; +use asap_devtools::lower_promql; +use asap_types::{ + post_asap::SketchAlgorithm, + pre_asap::{AggIntent, QueryExpr}, + types::AccuracyTarget, +}; +use serde_json::{json, Value}; + +const CORPUS: &str = + include_str!("../../../frontend-promql/tests/observability/data/o11y_bench_promql.txt"); + +#[derive(Clone, Copy, Debug)] +enum Kernel { + SumInstant, + MaxWindow, + SumAverageWindow, +} + +struct Fixture { + query: &'static str, + kernel: Kernel, + range_seconds: u64, + job_matcher: Option, +} + +// Admit pinned fixture queries whose full value computation is implemented. +// Regex construction belongs to planning, not execution, on both paths. +fn fixture(query: &'static str) -> Option { + let (kernel, range_seconds, matcher) = match query { + "sum(process_resident_memory_bytes)" | "sum(up)" => (Kernel::SumInstant, 0, None), + "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])" => { + (Kernel::MaxWindow, 43200, Some("^user-service$")) + } + "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])" => { + (Kernel::MaxWindow, 21600, Some("^order-service$")) + } + "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])" => { + (Kernel::MaxWindow, 21600, Some("^payment-service$")) + } + "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])" => { + (Kernel::MaxWindow, 21600, Some("^.+$")) + } + "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))" => { + (Kernel::SumAverageWindow, 21600, Some("^.+$")) + } + _ => return None, + }; + Some(Fixture { + query, + kernel, + range_seconds, + job_matcher: matcher.map(|m| regex::Regex::new(m).unwrap()), + }) +} + +struct Series { + job: &'static str, + samples: Vec, +} + +fn data(fixture: &Fixture, series: usize) -> Vec { + let samples = if fixture.range_seconds == 0 { + 1 + } else { + fixture.range_seconds as usize / 60 + }; + (0..series) + .map(|s| Series { + job: ["user-service", "order-service", "payment-service"][s % 3], + samples: (0..samples) + .map(|t| { + if fixture.query == "sum(up)" { + if s % 11 == 0 { + 0.0 + } else { + 1.0 + } + } else { + ((s * 73 + t * 31 + (s * t) % 17) % 10000) as f64 / 100.0 + } + }) + .collect(), + }) + .collect() +} + +fn raw(fixture: &Fixture, data: &[Series]) -> Vec { + let selected = data.iter().filter(|s| { + fixture + .job_matcher + .as_ref() + .is_none_or(|r| r.is_match(s.job)) + }); + match fixture.kernel { + Kernel::SumInstant => vec![selected.map(|s| s.samples[0]).sum()], + Kernel::MaxWindow => selected + .map(|s| s.samples.iter().copied().fold(f64::NEG_INFINITY, f64::max)) + .collect(), + Kernel::SumAverageWindow => vec![selected + .map(|s| s.samples.iter().sum::() / s.samples.len() as f64) + .sum()], + } +} + +#[cfg(unix)] +fn cpu_ns() -> u64 { + let mut ts = libc::timespec { + tv_sec: 0, + tv_nsec: 0, + }; + // A process CPU clock excludes scheduling waits; no wall-time conversion. + assert_eq!( + unsafe { libc::clock_gettime(libc::CLOCK_PROCESS_CPUTIME_ID, &mut ts) }, + 0 + ); + ts.tv_sec as u64 * 1_000_000_000 + ts.tv_nsec as u64 +} + +fn measure(mut op: impl FnMut(), iterations: usize) -> Value { + for _ in 0..2 { + op(); + } + let samples: Vec<_> = (0..5) + .map(|_| { + let start = cpu_ns(); + for _ in 0..iterations { + op(); + } + (cpu_ns() - start) as f64 / iterations as f64 + }) + .collect(); + let mean = samples.iter().sum::() / samples.len() as f64; + let stddev = (samples.iter().map(|x| (x - mean).powi(2)).sum::() + / (samples.len() - 1) as f64) + .sqrt(); + json!({"mean_cpu_ns":mean, "stddev_cpu_ns":stddev, "samples_cpu_ns":samples, "iterations_per_sample":iterations}) +} + +// This reference deployment admits exactly the root it profiled. CPU values +// apply to the complete bounded in-memory kernel, never an interior group. +struct ProfiledModel<'a> { + root: &'a QueryExpr, + approved: Vec>, + raw_cpu: f64, + candidate_cpu: f64, +} + +fn approved_profiles(root: &Rc) -> Vec> { + SketchAlgorithmStrategy::new(&DefaultCostModel) + .replacements(&TargetSubDAG::new(root)) + .into_iter() + .filter_map(|candidate| match candidate.replacement { + Replacement::Summary(node) + if matches!( + node.expr, + asap_types::post_asap::SummaryExpr::SummaryAgg { .. } + ) && node.guarantee.as_ref().is_some_and(|g| g.is_exact()) => + { + Some(node) + } + _ => None, + }) + .collect() +} + +impl CostModel for ProfiledModel<'_> { + fn rank_candidates( + &self, + intent: &AggIntent, + candidates: &[SketchAlgorithm], + ) -> Vec { + DefaultCostModel.rank_candidates(intent, candidates) + } + fn candidate_cost_covers_complete_plan(&self) -> bool { + true + } + fn candidate_cost( + &self, + candidate: &ReplacementSubDAG, + target: &TargetSubDAG<'_>, + ) -> Option { + let Replacement::Summary(node) = &candidate.replacement else { + return None; + }; + if target.root.as_ref() != self.root || !self.approved.contains(node) { + return None; + } + (self.candidate_cpu < self.raw_cpu).then_some(Cost(self.candidate_cpu)) + } + fn estimate_cost(&self, candidate: &ReplacementSubDAG, target: &TargetSubDAG<'_>) -> f64 { + self.candidate_cost(candidate, target) + .map_or(f64::INFINITY, |c| c.0) + } +} + +fn run(fixture: &Fixture, series: usize, evaluations: usize) -> Value { + let root = Rc::new(lower_promql(fixture.query, AccuracyTarget::Exact).unwrap()); + let data = data(fixture, series); + let cached = raw(fixture, &data); + // Same ordered per-series output, or the same scalar; immutable fixed + // windows, no staleness, NaNs, counter resets, or advancing evaluation time. + assert_eq!(raw(fixture, &data), cached.clone()); + let raw_measurement = measure( + || { + black_box(raw(black_box(fixture), black_box(&data))); + }, + 25, + ); + let read_measurement = measure( + || { + black_box(black_box(&cached).clone()); + }, + 10000, + ); + let raw_per_eval = raw_measurement["mean_cpu_ns"].as_f64().unwrap(); + let read_per_eval = read_measurement["mean_cpu_ns"].as_f64().unwrap(); + // Building a fixed-window summary executes the identical raw kernel once. + // Both timers include output allocation and destruction; one-time build + // therefore conservatively includes a destruction absent during retention. + let raw_total = raw_per_eval * evaluations as f64; + let summary_total = raw_per_eval + read_per_eval * evaluations as f64; + let model = ProfiledModel { + root: &root, + approved: approved_profiles(&root), + raw_cpu: raw_total, + candidate_cpu: summary_total, + }; + let candidates = SketchAlgorithmStrategy::new(&model).replacements(&TargetSubDAG::new(&root)); + let accepted = candidates + .iter() + .filter(|c| model.candidate_cost(c, &TargetSubDAG::new(&root)).is_some()) + .count(); + let space = search_workload_with_targets( + vec![(0, root.clone(), Some(AccuracyTarget::Exact))], + &default_strategies_with(&model), + &DefaultAccuracyModel, + ); + let selection = space.global_selection(&model); + let selected_root = &space.roots[0].1; + let selected_plan = selection.materialize(selected_root).unwrap(); + let selected_summary = selected_plan + .as_ref() + .is_some_and(|node| model.approved.contains(node)); + let retained_value_bytes = cached.len() * std::mem::size_of::(); + json!({"query":fixture.query,"status":"profiled_fixed_snapshot", "kernel":format!("{:?}",fixture.kernel), + "profile_model_version":"fixed-snapshot-exact-values-v1", "planner_candidate_count":candidates.len(), + "accepted_measured_candidates":accepted, + "selected":if selected_summary {"retained_exact_summary"} else {"raw_recompute"}, + "selected_planner_graph":selected_plan.as_ref().map(|node|asap_types::dag_export::export_summary(node)), + "input_series":series,"selected_series":data.iter().filter(|s|fixture.job_matcher.as_ref().is_none_or(|r|r.is_match(s.job))).count(), + "samples_per_series":data[0].samples.len(),"sample_interval_seconds":60,"range_seconds":fixture.range_seconds, + "input_value_bytes":data.iter().map(|s|s.samples.len()*8).sum::(), + "retained_value_bytes":retained_value_bytes,"retained_value_bytes_method":"exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "raw_per_evaluation":raw_measurement,"summary_read_per_evaluation":read_measurement, + "evaluations":evaluations,"raw_cpu_ns":raw_total,"summary_cpu_ns":summary_total, + "estimated_cpu_reduction_fraction":if selected_summary {Some(1.0-summary_total/raw_total)} else {None}, + "output_equality_verified":true, + "comparison_scope":"same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "exclusions":["disk/network storage and protocol serialization", "label output materialization shared by both paths", "live updates, eviction, sliding windows, staleness and exceptional samples"]}) +} + +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().skip(1).collect(); + let series: usize = args.first().map_or(Ok(300), |x| x.parse())?; + let evaluations: usize = args.get(1).map_or(Ok(60), |x| x.parse())?; + if args.len() > 2 || series == 0 || series > 10000 || evaluations == 0 { + return Err("usage: o11y_exact_bench [SERIES(1..10000)] [EVALUATIONS>0]".into()); + } + let rows: Vec<_> = CORPUS.lines().map(str::trim).filter(|q|!q.is_empty()&&!q.starts_with('#')).map(|q| + fixture(q).map_or_else(||json!({"query":q,"status":"unavailable","reason":"no complete reference kernel for this query; no borrowed costs"}), |f|run(&f,series,evaluations))).collect(); + let cpu = std::fs::read_to_string("/proc/cpuinfo").ok().and_then(|text| + text.lines().find(|line|line.starts_with("model name")).map(str::to_owned)); + let revision = std::process::Command::new("git").args(["rev-parse","HEAD"]).output().ok() + .filter(|out|out.status.success()).map(|out|String::from_utf8_lossy(&out.stdout).trim().to_owned()); + serde_json::to_writer_pretty( + std::io::stdout(), + &json!({"schema_version":1, + "data":"synthetic deterministic finite gauges; three jobs; non-stale finite float samples on (T-window,T] every60s", + "implementation":"o11y_exact_bench Rust reference kernels; not production data-plane runtime", + "build_profile":if cfg!(debug_assertions){"debug"}else{"release"}, + "source_revision":revision,"source_file":"crates/devtools/src/bin/o11y_exact_bench.rs", + "command_arguments":args,"cpu":cpu,"os":std::env::consts::OS,"arch":std::env::consts::ARCH, + "timing_environment":"shared development host; no exclusive core reservation or CPU affinity", + "clock":"CLOCK_PROCESS_CPUTIME_ID","rows":rows}), + )?; + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn admission_is_explicit_and_unknown_semantics_stay_unavailable() { + assert_eq!(CORPUS.lines().filter(|q| fixture(q).is_some()).count(), 7); + assert!(fixture("sum(rate(http_requests_total[5m]))").is_none()); + } + #[test] + fn kernels_match_independent_small_reference_results() { + let input = vec![ + Series { + job: "order-service", + samples: vec![2.0, 4.0], + }, + Series { + job: "payment-service", + samples: vec![8.0, 10.0], + }, + ]; + let max = + fixture("max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])").unwrap(); + assert_eq!(raw(&max, &input), vec![4.0]); + let avg = + fixture("sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))").unwrap(); + assert_eq!(raw(&avg, &input), vec![12.0]); + } + #[test] + fn measured_scope_and_break_even_control_candidate_acceptance() { + let root = Rc::new(lower_promql("sum(up)", AccuracyTarget::Exact).unwrap()); + let target = TargetSubDAG::new(&root); + let candidates = SketchAlgorithmStrategy::new(&DefaultCostModel).replacements(&target); + assert!(!candidates.is_empty()); + let slow = ProfiledModel { + root: &root, + approved: approved_profiles(&root), + raw_cpu: 100.0, + candidate_cpu: 101.0, + }; + let fast = ProfiledModel { + root: &root, + approved: approved_profiles(&root), + raw_cpu: 100.0, + candidate_cpu: 90.0, + }; + assert!(slow.candidate_cost(&candidates[0], &target).is_none()); + assert_eq!( + fast.candidate_cost(&candidates[0], &target), + Some(Cost(90.0)) + ); + let other = Rc::new(lower_promql("sum(other)", AccuracyTarget::Exact).unwrap()); + assert!(fast + .candidate_cost(&candidates[0], &TargetSubDAG::new(&other)) + .is_none()); + let mut unprofiled = candidates[0].clone(); + let mut node = fast.approved[0].as_ref().clone(); + node.expr = asap_types::post_asap::SummaryExpr::KeepPreAsap(root.clone()); + unprofiled.replacement = Replacement::Summary(Rc::new(node)); + assert!(fast.candidate_cost(&unprofiled, &target).is_none()); + } +} diff --git a/crates/devtools/src/bin/o11y_replay.rs b/crates/devtools/src/bin/o11y_replay.rs new file mode 100644 index 00000000..579f586d --- /dev/null +++ b/crates/devtools/src/bin/o11y_replay.rs @@ -0,0 +1,495 @@ +//! Offline workload replay through search, selection, and lifecycle planning. +use std::{collections::HashSet, error::Error, rc::Rc, time::Instant}; + +use asap_aware_mapping::empirical_cost::{ + EmpiricalCostModel, EmpiricalEvidenceProvider, EvidenceArtifact, EvidenceContext, +}; +use asap_aware_mapping::{ + default_strategies_with, export_summary_maintenance_plan, + materialize_with_summary_maintenance_lifecycles, search_workload_with_targets, CostModel, + DefaultAccuracyModel, DefaultCostModel, Horizon, Replacement, + SummaryMaintenanceLifecycleCapabilities, WorkloadDemand, +}; +use asap_devtools::lower_promql; +use asap_types::{ + dag_export, + post_asap::{SummaryExpr, SummaryFamilyType, SummaryNode}, + pre_asap::QueryExpr, + types::AccuracyTarget, + workload::*, +}; +use serde_json::{json, Value}; + +const CORPUS: &str = + include_str!("../../../frontend-promql/tests/observability/data/o11y_bench_promql.txt"); +const SUPPLEMENTAL: &str = "quantile_over_time(0.95, service_latency_seconds[5m])\nquantile_over_time(0.99, service_latency_seconds[5m])\ncount_over_time(offline_frequency_metric[5m])"; + +struct Options { + epsilon: f64, + evaluations: u64, + now_ms: u64, + supplemental: bool, + queries: Option, + evidence_path: Option, + context_path: Option, +} + +impl Default for Options { + fn default() -> Self { + Self { + epsilon: 0.01, + evaluations: 60, + now_ms: 1_788_825_600_000, + supplemental: false, + queries: None, + evidence_path: None, + context_path: None, + } + } +} + +fn parse_options(args: impl IntoIterator) -> Result> { + let mut options = Options::default(); + let mut args = args.into_iter(); + while let Some(arg) = args.next() { + match arg.as_str() { + "--supplemental" => options.supplemental = true, + "--epsilon" => options.epsilon = args.next().ok_or("missing epsilon")?.parse()?, + "--evaluations" => options.evaluations = args.next().ok_or("missing evaluations")?.parse()?, + "--now-ms" => options.now_ms = args.next().ok_or("missing now-ms")?.parse()?, + "--queries" => options.queries = Some(std::fs::read_to_string(args.next().ok_or("missing queries path")?)?), + "--evidence" => options.evidence_path = Some(args.next().ok_or("missing evidence path")?), + "--context" => options.context_path = Some(args.next().ok_or("missing context path")?), + _ => return Err(format!("unknown option {arg}; use --epsilon, --evaluations, --now-ms, --queries, --supplemental, --evidence and --context").into()), + } + } + if !options.epsilon.is_finite() + || !(0.0..1.0).contains(&options.epsilon) + || options.epsilon == 0.0 + { + return Err("epsilon must be finite and strictly between 0 and 1".into()); + } + if options.evaluations == 0 { + return Err("evaluations must be positive".into()); + } + if options.evidence_path.is_some() != options.context_path.is_some() { + return Err("--evidence and --context must be supplied together".into()); + } + Ok(options) +} + +fn queries(text: &str) -> Vec { + text.lines() + .map(str::trim) + .filter(|q| !q.is_empty() && !q.starts_with('#')) + .map(str::to_owned) + .collect() +} + +// Attribute memo groups by DAG identity after workload-wide CSE. Scalar +// expressions aren't replacement sites; they remain part of their operator. +fn reachable(node: &QueryExpr, found: &mut HashSet<*const QueryExpr>) { + if !found.insert(node as *const QueryExpr) { + return; + } + use QueryExpr::*; + match node { + PromqlVectorFromScalar(child) + | PromqlScalarFromVector(child) + | PromqlRelabel { child, .. } + | PromqlInfoEnrich { child, .. } + | PromqlSeriesSample { child, .. } + | Filter { child, .. } + | Project { child, .. } + | Aggregate { child, .. } + | Dedup { child, .. } + | PromqlSubquery { child, .. } + | TimeRange { child, .. } + | TimeShift { child, .. } + | SQLWindowFunc { child, .. } + | Sort { child, .. } + | Limit { child, .. } => reachable(child, found), + Concat { children, .. } => { + for child in children { + reachable(child, found); + } + } + Join { left, right, .. } | SetOp { left, right, .. } => { + reachable(left, found); + reachable(right, found); + } + BinaryOp { lhs, rhs, .. } => { + reachable(lhs, found); + reachable(rhs, found); + } + _ => {} + } +} + +fn family_report( + family: &SummaryFamilyType, + provider: Option<&EmpiricalEvidenceProvider>, +) -> Value { + let evidence = if let SummaryFamilyType::Sketch(kind, _) = family { + match provider { + Some(provider) => match provider.lookup(kind.algorithm(), kind.params()) { + Ok(row) => json!({"status": "matched_configuration", "measurement": row, + "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query"}), + Err(error) => json!({"status": "unavailable", "reason": error.to_string()}), + }, + None => { + json!({"status": "unavailable", "reason": "no empirical provider in this mode"}) + } + } + } else { + json!({"status": "unavailable", "reason": "offline sketch evidence does not cost exact operators"}) + }; + let sketch = match family { + SummaryFamilyType::Sketch(kind, _) => { + json!({"algorithm": kind.algorithm(), "params": kind.params()}) + } + _ => Value::Null, + }; + json!({"family": format!("{family:?}"), "sketch": sketch, + "is_sketch": matches!(family, SummaryFamilyType::Sketch(..)), "offline_evidence": evidence}) +} + +fn families( + node: &SummaryNode, + result: &mut Vec, + provider: Option<&EmpiricalEvidenceProvider>, +) { + use SummaryExpr::*; + match &node.expr { + SummaryAgg { family, child, .. } => { + result.push(family_report(family, provider)); + families(child, result, provider); + } + SummaryJoin { + family, + outer, + inner, + .. + } => { + result.push(family_report(family, provider)); + families(outer, result, provider); + families(inner, result, provider); + } + SummaryEstimate { summary_input, .. } | SummaryDelete { summary_input, .. } => { + families(summary_input, result, provider) + } + BinaryOp { lhs, rhs, .. } => { + families(lhs, result, provider); + families(rhs, result, provider); + } + SummarySubtract { left, right } => { + families(left, result, provider); + families(right, result, provider); + } + SummaryMerge { children } => { + for child in children { + families(child, result, provider); + } + } + KeepPreAsap(_) => {} + } +} + +fn replay( + name: &str, + query_texts: &[String], + accuracy: AccuracyTarget, + options: &Options, + model: &dyn CostModel, + provider: Option<&EmpiricalEvidenceProvider>, +) -> Value { + let lowering_start = Instant::now(); + let mut roots = Vec::new(); + let mut rows = Vec::new(); + for (index, query) in query_texts.iter().enumerate() { + match lower_promql(query, accuracy.clone()) { + Ok(root) => roots.push((index, Rc::new(root), Some(accuracy.clone()))), + Err(error) => rows.push(json!({"index": index, "query": query, "coverage": "rejected", "reason": error.to_string()})), + } + } + let lowering_ns = lowering_start.elapsed().as_nanos(); + let search_start = Instant::now(); + let space = search_workload_with_targets( + roots, + &default_strategies_with(model), + &DefaultAccuracyModel, + ); + let search_ns = search_start.elapsed().as_nanos(); + let selection_start = Instant::now(); + let ranked = space.cost_sorted(model); + let selection = space.global_selection(model); + let selection_ns = selection_start.elapsed().as_nanos(); + let workload = QueryWorkload { + language: QueryLanguage::PromQL, + query_batch: Some( + query_texts + .iter() + .map(|q| BatchEntry { + query: Query(q.clone()), + requirements: QueryRequirements { + accuracy: AccuracyRequirement::Explicit(accuracy.clone()), + ..Default::default() + }, + predictability: Predictability::AdHoc, + invocations: options.evaluations, + execute_at: Some(TimestampMs(options.now_ms)), + time_selection: TimeSelection { + as_of: Some(TimestampMs(options.now_ms)), + ..Default::default() + }, + }) + .collect(), + ), + repeating_queries: None, + data_workload: Some(DataWorkload { + arrival: DataArrival::AtRest, + ..Default::default() + }), + }; + for (index, root) in &space.roots { + let started = Instant::now(); + let mut found = HashSet::new(); + reachable(root, &mut found); + let mut candidates = Vec::new(); + let mut rejected = Vec::new(); + for (group_index, group) in ranked + .iter() + .enumerate() + .filter(|(_, g)| found.contains(&Rc::as_ptr(g.target))) + { + let target_intent = asap_aware_mapping::replacement::bindable_intent(group.target) + .map(|intent| format!("{intent:?}")); + for (rank, candidate) in group.candidates.iter().enumerate() { + let mut family_list = Vec::new(); + if let Replacement::Summary(node) = &candidate.replacement { + families(node, &mut family_list, provider); + } + candidates.push( + json!({"group": group_index, "rank": rank, "strategy": candidate.strategy, + "target_intent": target_intent, + "rationale": candidate.rationale, "families": family_list, + "heuristic_score": group.costs[rank].is_finite().then_some(group.costs[rank]), + "score_unit": "dimensionless_not_cpu", "consumer_count": group.consumer_count}), + ); + } + if let Some(memo) = space.group_for(group.target) { + rejected.extend(memo.rejected.iter().map(|r| json!({"group": group_index, "strategy": r.strategy, "description": r.description, "reason": r.error.to_string()}))); + } + } + let has_sketch = candidates.iter().any(|c| { + c["families"] + .as_array() + .unwrap() + .iter() + .any(|f| f["is_sketch"] == true) + }); + let has_summary = candidates + .iter() + .any(|c| !c["families"].as_array().unwrap().is_empty()); + let materialized = selection.materialize(root); + let root_plan = match materialized { + Ok(Some(node)) => { + json!({"graph": dag_export::export_summary(&node), "guarantee": node.guarantee}) + } + Ok(None) => json!({"reason": "no selected root group"}), + Err(error) => json!({"reason": error.to_string()}), + }; + let lifecycle = match materialize_with_summary_maintenance_lifecycles( + &selection, + root, + WorkloadDemand::new(&workload, &[*index]), + options.now_ms, + Some(Horizon(3600.0)), + SummaryMaintenanceLifecycleCapabilities::ALL, + model, + ) { + Ok(Some(plan)) => json!(export_summary_maintenance_plan(&plan)), + Ok(None) => json!({"reason": "no selected root group", "selected_raw_recompute": true}), + Err(error) => json!({"reason": error.to_string(), "selected_raw_recompute": true}), + }; + rows.push(json!({"index": index, "query": query_texts[*index], + "coverage": if has_sketch { "sketch_candidate" } else if has_summary { "exact_summary_candidate" } else { "exact_fallback" }, + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "candidates": candidates, "rejections": rejected, "root_plan": root_plan, "lifecycle_plan": lifecycle, + "report_and_materialization_ns": started.elapsed().as_nanos(), + "estimated_end_to_end_cpu_savings": null, "estimated_end_to_end_memory_savings": null, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable"})); + } + rows.sort_by_key(|row| row["index"].as_u64()); + let mut coverage_counts = std::collections::BTreeMap::new(); + for row in &rows { + *coverage_counts + .entry(row["coverage"].as_str().unwrap_or("unknown")) + .or_insert(0) += 1; + } + let raw_fallback_count = rows + .iter() + .filter(|row| row["lifecycle_plan"]["selected_raw_recompute"] == true) + .count(); + json!({"mode": name, "accuracy": accuracy, "lowering_ns": lowering_ns, "search_ns": search_ns, + "selection_ns": selection_ns, "query_count": query_texts.len(), "memo_groups": space.len(), + "coverage_counts": coverage_counts, "lifecycle_raw_fallback_count": raw_fallback_count, "queries": rows}) +} + +fn report(options: &Options, empirical: Option<&EmpiricalCostModel>) -> Value { + let mut corpora = vec![( + if options.queries.is_some() { + "custom" + } else { + "o11y_bench" + }, + queries(options.queries.as_deref().unwrap_or(CORPUS)), + )]; + if options.supplemental { + corpora.push(("supplemental_sketch_queries", queries(SUPPLEMENTAL))); + } + let corpora: Vec = corpora + .into_iter() + .map(|(name, queries)| { + let mut runs = vec![ + replay( + "exact", + &queries, + AccuracyTarget::Exact, + options, + &DefaultCostModel, + None, + ), + replay( + "default", + &queries, + AccuracyTarget::Epsilon(options.epsilon), + options, + &DefaultCostModel, + None, + ), + ]; + if let Some(model) = empirical { + runs.push(replay( + "empirical", + &queries, + AccuracyTarget::Epsilon(options.epsilon), + options, + model, + Some(&model.provider), + )); + } + json!({"name": name, "source": match name { + "o11y_bench" => "repository-vendored grafana/o11y-bench snapshot", + "custom" => "user-supplied PromQL query file", + _ => "local supplemental examples, not upstream o11y queries" + }, "runs": runs}) + }) + .collect(); + json!({"schema_version": 1, "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", + "empirical_context": empirical.map(|m| m.provider.context()), + "empirical_artifact": empirical.map(|m| json!({"schema_version": m.provider.artifact().schema_version, + "benchmark_version": m.provider.artifact().benchmark_version, "model_version": m.provider.artifact().model_version})), + "vendored_fixture_source": {"repository": "https://github.com/grafana/o11y-bench", "vendored_snapshot_date": "2026-07-17", "upstream_commit": null, + "note": "existing 27-query local fixture; upstream revision and scenario data were not provided"}, + "assumptions": {"evaluation_time_ms": options.now_ms, "evaluations_per_query": options.evaluations, + "data_arrival": "at_rest", "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", + "lifecycle_horizon_seconds": 3600, "runtime_capabilities": "hypothetical all supported, no runtime launched", + "timing": "single wall-clock sample; report/materialization timing includes JSON export"}, + "corpora": corpora}) +} + +fn main() -> Result<(), Box> { + let options = parse_options(std::env::args().skip(1))?; + let empirical = match (&options.evidence_path, &options.context_path) { + (Some(evidence), Some(context)) => { + let artifact: EvidenceArtifact = + serde_json::from_str(&std::fs::read_to_string(evidence)?)?; + let context: EvidenceContext = + serde_json::from_str(&std::fs::read_to_string(context)?)?; + Some(EmpiricalCostModel::new(EmpiricalEvidenceProvider::new( + artifact, context, + )?)) + } + _ => None, + }; + println!( + "{}", + serde_json::to_string_pretty(&report(&options, empirical.as_ref()))? + ); + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Invalid CLI numbers must fail before they can poison cost estimates. + #[test] + fn rejects_invalid_configuration() { + for value in ["NaN", "0", "1", "-1"] { + assert!(parse_options(["--epsilon".into(), value.into()]).is_err()); + } + assert!(parse_options(["--evaluations".into(), "0".into()]).is_err()); + } + + /// Real workload lowering alone never counts as sketch or deployment coverage. + #[test] + fn o11y_replay_records_all_queries_and_conservative_costs() { + let result = report(&Options::default(), None); + for run in result["corpora"][0]["runs"].as_array().unwrap() { + assert_eq!(run["query_count"], 27); + assert!(run["memo_groups"].as_u64().unwrap() > 0); + for row in run["queries"].as_array().unwrap() { + assert_ne!(row["coverage"], "rejected"); + assert_ne!(row["coverage"], "sketch_candidate"); + assert!(row["estimated_end_to_end_cpu_savings"].is_null()); + assert_eq!(row["lifecycle_plan"]["selected_raw_recompute"], true); + } + } + } + + /// Supplemental sketches and rejected syntax remain separately identifiable. + #[test] + fn sketches_and_rejections_are_explicit() { + let qs = vec!["quantile_over_time(0.95, latency[5m])".into(), "!!!".into()]; + let result = replay( + "default", + &qs, + AccuracyTarget::Epsilon(0.01), + &Options::default(), + &DefaultCostModel, + None, + ); + assert_eq!(result["queries"][0]["coverage"], "sketch_candidate"); + assert_eq!(result["queries"][1]["coverage"], "rejected"); + assert!(result["queries"][1]["reason"].is_string()); + } + + /// Count-over-time exercises the measured CMS/CountSketch configuration, + /// while its evidence remains absent unless an artifact is supplied. + #[test] + fn supplemental_count_exposes_frequency_sketch_candidates() { + let result = replay( + "default", + &queries("count_over_time(metric[5m])"), + AccuracyTarget::Epsilon(0.01), + &Options::default(), + &DefaultCostModel, + None, + ); + let families: Vec<_> = result["queries"][0]["candidates"] + .as_array() + .unwrap() + .iter() + .flat_map(|c| c["families"].as_array().unwrap()) + .collect(); + for algorithm in ["Cms", "CountSketch"] { + let family = families + .iter() + .find(|f| f["sketch"]["algorithm"] == algorithm) + .unwrap(); + assert_eq!(family["offline_evidence"]["status"], "unavailable"); + } + } +} diff --git a/crates/devtools/src/bin/offline_recommend.rs b/crates/devtools/src/bin/offline_recommend.rs new file mode 100644 index 00000000..3f6333f0 --- /dev/null +++ b/crates/devtools/src/bin/offline_recommend.rs @@ -0,0 +1,28 @@ +//! Evaluate an explicit offline error/resource requirement against measured data. +use asap_aware_mapping::empirical_comparison::{ + recommend_offline, OfflineComparisonEvidence, OfflineComparisonRequest, +}; + +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().skip(1).collect(); + if args.len() != 2 { + return Err("usage: offline_recommend COMPARISON-EVIDENCE.json REQUEST.json".into()); + } + let evidence: OfflineComparisonEvidence = + serde_json::from_str(&std::fs::read_to_string(&args[0])?)?; + let request: OfflineComparisonRequest = + serde_json::from_str(&std::fs::read_to_string(&args[1])?)?; + let recommendation = recommend_offline(&evidence, &request)?; + serde_json::to_writer_pretty( + std::io::stdout(), + &serde_json::json!({ + "schema_version":1, + "benchmark_version":evidence.sketch_evidence.benchmark_version, + "model_version":evidence.sketch_evidence.model_version, + "request":request, + "recommendation":recommendation, + "accuracy_scope":"observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee" + }), + )?; + Ok(()) +} diff --git a/docs/design_docs/empirical-o11y-execution-plan.md b/docs/design_docs/empirical-o11y-execution-plan.md new file mode 100644 index 00000000..0471529e --- /dev/null +++ b/docs/design_docs/empirical-o11y-execution-plan.md @@ -0,0 +1,60 @@ +# Offline evidence and o11y planning evaluation + +Audience: developers reproducing issue #322 and the planner/control-plane evaluation. + +## Scope + +Use offline sketch-bench CPU, elapsed time, state/memory, disk (when measured), +and errors against offline ground truth. No runtime ground truth, posterior +feedback, or self-estimated accuracy is required. Offline accuracy observations +do not establish formal guarantees on unseen distributions. + +## Execution and ownership + +1. Pin isolated planner and control-plane worktrees from fetched main branches. + Preserve existing worktrees, including unresolved cost-model changes. +2. Evidence agent: implement the versioned artifact, validation, compatibility + matching, public cost-model integration, and fallback/decision tests. +3. Benchmark agent: run actual sketch-bench algorithms on uniform and Zipf + inputs, preserve raw output, export artifacts with source and environment + provenance, and document reproducible commands. +4. Replay agent: run the existing o11y PromQL corpus through actual planning, + export candidate coverage and planning latency, and separately identify + supplemental sketch workloads. +5. Integration owner: connect compatible evidence to the downstream control + plane, validate dependency compatibility, review other agents' changes, run + integration checks, and report evidence-supported comparisons. + +Steps 2–4 run concurrently after agreeing the artifact contract. Integration +uses their completed interfaces and measurements. Query-pattern changes are +limited to demonstrated blockers with regression coverage; unsupported query +semantics remain explicit in the report. + +## Acceptance + +- Versioned schema and example; explicit units, algorithm/configuration, + dataset/distribution, environment, collection/validity times, sample count, + dispersion, and benchmark/model provenance. +- At least two actual sketch algorithms measured offline on uniform and skewed + inputs. CPU is distinct from elapsed time; serialization size is distinct + from heap memory and disk I/O. Unmeasured fields stay unavailable. +- Matching evidence affects a public planning cost/ranking/lifecycle boundary. + Tests cover changed decisions, missing/stale/mismatched evidence, invalid + values, and unchanged accuracy guarantees. +- The planner and control-plane evaluation preserve exact fallbacks and expose + unsupported shapes, measured provenance, and limits on benefit estimates. +- Reproducible measurement and replay commands, raw machine-readable results, + and a concise report distinguish actual measurements from modeled totals. + +## Comparison rules + +Compare equivalent tasks, data, parameters, windows, horizons, and evaluation +cadences. Whole-plan estimates include build/update/readout, retained windows, +sharing, and raw residual work where evidence exists. Missing raw baseline or +physical evidence means an unavailable whole-plan speedup, not zero cost. +Microbenchmark algorithm comparisons are labeled separately. Disk usage and +network savings require their own measurements or explicit models. + +Repeated-query break-even can be computed only when compatible exact baseline, +sketch build/maintenance, and readout measurements are present. It is an offline +estimate and does not establish deployed end-to-end latency improvement. diff --git a/docs/offline-o11y-evaluation-2026-09-08.md b/docs/offline-o11y-evaluation-2026-09-08.md new file mode 100644 index 00000000..083ff87b --- /dev/null +++ b/docs/offline-o11y-evaluation-2026-09-08.md @@ -0,0 +1,111 @@ +# 离线 sketch 证据接入与 o11y 规划评估 + +> 本文保留第一轮实验的历史状态(包括当时未提交、24/27 绑定以及未测构造/磁盘)。 +> 后续实现、最终结果和交付状态以 [最终报告](offline-o11y-final-2026-09-08.md) 为准。 + +## 执行结果 + +三个 agent 并行完成了离线证据 provider、真实 sketch-bench 测量和 +planner replay;主 agent 完成 control-plane 接入、版本兼容和集成验证。 +完整步骤见 [执行计划](design_docs/empirical-o11y-execution-plan.md)。 + +实现与测量使用独立 worktree,原有工作区的冲突和修改未动: + +- Planner:`/mydata/asapplanner-empirical-o11y`,基线 `378a754`。 +- Control plane:`/mydata/ASAPQuery-backend/.worktrees/empirical-o11y-322`,基线 `95131d8`。 +- sketch-bench:`/mydata/sketch-bench-empirical-322`,固定 `87f619e843fd2e4da784160d4e205a0d0d55f032`,源码未修改。 + +没有提交、推送、发布 PR 或关闭 issue。两个产品 worktree 的改动仍可本地审查。 + +## #322 已实现的路径 + +1. 版本化 JSON artifact、JSON Schema、显式标注的合成测试 fixture,以及真实测量文件。 +2. 离线误差、CPU、内存、分布、精确参数、运行环境、样本数、离散程度、有效期和来源信息。 +3. 公共 `CostModel` 的测量排序接口,以及 control plane 对其实际 sizing 参数的证据查找。 +4. 全部候选都有匹配的 update CPU 证据时按该指标排序;缺失、过期、配置/环境/分布不匹配或歧义时保留默认顺序。 +5. 测试证明改变兼容证据会改变真实绑定结果,同时保持参数与准确率保证;实际测量支持默认 CMS 优先,未人为制造收益或决策变化。 + +这次排序目标是单次更新 CPU,不是 CPU、内存、磁盘的综合最优目标。 +离线误差保留为对应查询的观测,不升级为形式化保证,也不直接用来缩小 sketch。 +生命周期接口只提供有依据的部分成本;缺少语义匹配的 readout、retention、retirement +或 raw/residual 成本时,完整方案仍不可估计。实时 ground truth、自估误差和在线反馈均不在本次范围内。 + +## 数据与测量 + +使用真正的 sketch-bench,比较 CMS、CountSketch 和 Polars group-by + HashMap +精确频率索引。每个数据集有 20,000 个 i64 key,生成 key 空间为 1,000,seed=42; +uniform 实际 1,000 个 distinct key,Zipf(指数 1.1)实际 952 个。 +CPU 每项 5 次测量、2 次预热;误差来自每个固定数据集的一次离线准确率实验。 + +| 分布/算法 | 更新 CPU(ns/item) | 读 CPU(ns/key) | retained/peak requested heap | 平均绝对相对频率误差 | +| --- | ---: | ---: | ---: | ---: | +| Uniform CMS | 36.64 | 49.80 | 5,440 B | 163.47% | +| Uniform CountSketch | 1,179.19 | 3,813.40 | 9,960,000 B | 0(该离线样本) | +| Zipf CMS | 35.68 | 44.33 | 5,440 B | 231.65% | +| Zipf CountSketch | 948.19 | 3,911.34 | 9,960,000 B | 0(该离线样本) | + +CMS 参数为 272 × 5,CountSketch 为 30,000 × 83。CMS 的 additive epsilon +约束以流量总量为基准,并非每个 key 的 1% 相对误差约束,不能把上表误差解释为满足后者。 +CountSketch 的零观测误差也不保证其他数据上的误差为零。 + +内存由独立存活对象探针测量,统计申请的堆字节,不包含输入数据、分配器页开销或整个进程 RSS。 +CPU 与内存探针的分配器差异有单独说明。磁盘、序列化大小和空 sketch 构造 CPU 未测量,保持 null。 + +对加载这些数据后执行 1,000 次 point-frequency 查询,已测 CPU 分项之和如下: + +| 数据 | CMS | 精确索引 | CountSketch | +| --- | ---: | ---: | ---: | +| Uniform | 0.783 ms | 0.741 ms | 27.397 ms | +| Zipf | 0.758 ms | 0.799 ms | 22.875 ms | + +这是含精确索引 prepare 的离线分项估算,未包含未测量的 sketch 构造。 +因此不能报告完整 break-even 或部署后的加速比。精确索引的状态大小 290,816 B +来自上游公式,也不能与 requested heap 的差额称作实测整体内存节省。 +详见 [测量报告及原始数据](../tools/empirical-bench/results/MEASUREMENTS.md)。 + +## o11y 结果 + +使用仓库已有的 27 条 PromQL fixture;这是 2026-07-17 的 vendored snapshot, +Git blob 为 `ea2eee98d78c5c9354363dc378303d98ac141672`,没有可证实的上游 commit。 +这次没有运行上游 LLM-agent 评分,也没有测量 o11y 真实数据分布。 + +| 检查层 | 结果 | +| --- | --- | +| Planner 查询候选覆盖 | 26/27 有精确摘要候选,1/27 原始回退;0/27 有近似 sketch 候选 | +| Planner 完整生命周期选择 | 27/27 保守 raw 回退,完整物理成本证据不足 | +| Control-plane parser + typed binder | exact/default/empirical 各 24/27 绑定成功、3/27 拒绝 | +| 独立补充查询 | 两条 quantile、一条 count_over_time;default/empirical 均可产生 sketch 候选 | +| 测量匹配 | count_over_time 的 CMS/CountSketch 配置匹配更新成本;quantile 缺少测量 | + +Control-plane 拒绝的三种形式是裸指标选择、`sort_desc(...)` 和 `... > 0`。 +它们不是 parser 失败;当前 typed binder 没有对应可绑定的根候选。 +成功绑定也不等于可部署执行,部分绑定结果仍是原始查询回退。 +为接通新版 Planner,补充了 Concat 元数据处理和 Summary BinaryOp 兼容; +warm tier 尚不能执行的二元运算保持显式 fallback。 + +实测证据没有改变 o11y 选择,因为这些查询没有对应 sketch 候选。 +补充查询的 CMS update CPU 明显较低,测量排序保持 CMS 在前。 +离线 point-frequency 误差不被当作 count_over_time 或 o11y 结果误差。 + +完整查询 CPU/内存收益均为 null。下一阶段要量化 o11y 收益,需要精确摘要及 raw/residual +算子在对应 metric 数据、group cardinality、窗口和执行频率下的测量,随后接入完整物理成本比较。 +仅增加 sketch 算法测量不能填补这些输入。 + +## 验证与复现 + +- Planner mapping 单元测试:342 项通过。 +- Planner replay:4 项通过;导出归一化测试见 benchmark README。 +- Control-plane 全部 library 单元测试:633 项通过。 +- 新增 control-plane 集成测试:3 项通过,覆盖改变绑定、保守回退和二元运算 fallback。 +- Provider、replay、control-plane 接入与 benchmark 测量口径经过其他 agent 交叉检查。 + +复现入口: + +- [真实 benchmark 命令与测量方法](../tools/empirical-bench/README.md) +- [Planner replay 命令](user-guide/o11y-replay.md) +- Control plane:其 worktree 的 `tools/run-offline-planner-replay.py` 和 + `control_plane/docs/offline-sketch-evidence.md`。 +- 输出目录:`tools/empirical-bench/results/`,包含 uniform/Zipf 的 evidence、context、 + planner replay 和 control-plane replay;控制面报告记录了实际命令和两仓库版本。 + +这些结果是离线可复现实验与规划覆盖报告,不是线上端到端性能结论。 diff --git a/docs/offline-o11y-final-2026-09-08.md b/docs/offline-o11y-final-2026-09-08.md new file mode 100644 index 00000000..c94eead4 --- /dev/null +++ b/docs/offline-o11y-final-2026-09-08.md @@ -0,0 +1,74 @@ +# 离线 sketch 证据与 o11y:最终报告 + +面向开发者。对应 #322 的离线证据路径,不包含实时误差反馈。原有脏工作区未修改。 + +## 完成的路径 + +- 版本化 artifact、JSON Schema 和公共 CostModel provider,按参数、查询语义、分布、环境和有效期匹配。未知测量保持 unavailable。 +- CMS/CountSketch 真实参数扫描:离线误差、分离的构造/更新/读取/合并 CPU、存活堆内存、序列化大小和文件块占用。 +- 固定快照 point-frequency 比较:显式观测误差门槛、formal 参数下限、CPU/retained byte-seconds 权重及同数据 exact baseline。 +- Backend 先过滤不支持的布局,再推荐和绑定 frequency 配置;exact 胜出或证据不足时保留原查询,不擅自把选中参数取整。 +- o11y planner/control-plane replay,以及七条显式支持查询的 exact 固定快照参考测量。 + +接口与复现见 [证据契约](developer_docs/offline-sketch-evidence.md)、 +[benchmark 命令](../tools/empirical-bench/README.md) 和 [replay 指南](user-guide/o11y-replay.md)。 + +## 实测结果 + +sketch-bench 固定 revision `87f619e843fd2e4da784160d4e205a0d0d55f032`。 +Uniform/Zipf 各 20,000 个 i64 key,key-space 1,000、seed 42、Zipf 指数 1.1。 +共 18 个 sketch 配置、两个 exact baseline;CPU 五次测量、两次预热。 +准确率是每个固定数据集的一次离线实验,不是跨分布保证或实时 ground truth。 +比较场景为一次构建、1,000 次查询、保留 300 秒、不合并。 + +| 场景 | Uniform / Zipf 结果 | +| --- | --- | +| CPU-only,1% 或 5% 观测平均相对误差上限 | 都选择 exact;没有 sketch CPU 收益 | +| 通用比较器,memory-weighted | CMS 2720×5;retained heap 减少 81.68%,CPU 分别增加约 0.037 / 0.182 ms | +| Backend 可绑定的 memory-weighted 配置 | CMS 4096×5;retained heap 减少约 72.4%,CPU 同样增加 | + +memory-weighted 目标为 `CPU ns + 0.01 × retained byte-seconds`;权重是示例偏好, +不是硬件测得的换算关系。Exact retained heap 为 296,976 B;CMS 2720×5 为 +54,400 B,4096×5 为 81,920 B。内存由独立 System 分配器探针测得申请字节, +CPU 使用 jemalloc;不等同于进程 RSS。序列化和文件块占用不代表磁盘吞吐收益。 + +详见 [最终扫描报告](../tools/empirical-bench/results-sweep/MEASUREMENTS.md)。 +`results/` 中旧频率测量及旧 control-plane replay 保留为初始基线;最终频率比较和 +控制面结果以 `results-sweep/` 为准,不混用两轮成本。 + +## o11y 覆盖及限制 + +复用仓库已有 27 条 PromQL fixture,不运行上游 LLM-agent 评分或真实场景数据。 + +| 检查 | 结果 | +| --- | --- | +| Planner 候选覆盖 | 26/27 有 exact summary 候选,1/27 raw fallback;没有 sketch 候选 | +| 原始 replay 完整生命周期成本 | 证据不足,27/27 保守 raw fallback | +| Control-plane exact/default/empirical 绑定 | 均 27/27 成功;其中各 5 条根计划仍保留原查询 | +| 七条 exact 参考查询 | 固定合成 gauge 快照上测 raw 与缓存结果读取,经过公共 CostModel 和真实选择流程 | +| 其余 20 条查询 | 缺少完整参考实现,收益 unavailable | + +新增 selector、sort、comparison/filter 根的原始 IR 保留回退,使绑定由 24/27 提升 +为 27/27。绑定不等于全部可由 summary executor 执行。新 IR 的列更新已兼容; +keyed/non-column 更新和 warm-tier BinaryOp 仍明确拒绝。 + +七条参考查询覆盖瞬时 sum、窗口 max 和 sum-of-window-average:300 series、三个 job、 +每分钟一个有限 gauge 样本,重复读取同一快照 60 次。保留的是完整 exact 查询结果, +不是推进时间的滑动窗口。测量排除网络、磁盘、协议序列化和输出标签物化;内存是 +逻辑值字节。不能把重复读取的收益外推为线上端到端加速。 +机器可读结果见 [exact 快照实验](../tools/empirical-bench/results/o11y-exact-snapshot.json)。 + +Quantile 测量、真实 o11y trace、时间漂移、合并后误差、在线更新与退休成本及完整线上 +收益仍未覆盖。Point-frequency 误差不能借给 quantile 或 count_over_time。 + +## 验证与交付 + +- Planner mapping:349 项单元测试通过。 +- Devtools:exact benchmark 3 项、replay 4 项通过;推荐 CLI 用六个实际请求验证。 +- Benchmark 导出:5 项 Python 测试通过。 +- Backend:control-plane 633 项、data-plane 973 项 library 测试通过;新增 7 项集成测试通过。 +- Provider、测量与绑定代码经过 agent 交叉审查;产物文本、JSON、源码哈希和 provenance 核对通过。 + +Backend 固定依赖已发布 planner 核心提交 `dfdf6b5c1f7d667394a4ea1f56fb3786af04228d`, +普通构建和最终 replay 无需本地 Cargo source patches。源码、工具和结果随两个仓库的 +配套 PR 交付,不自动合并或关闭 issue。 diff --git a/docs/user-guide/o11y-replay.md b/docs/user-guide/o11y-replay.md new file mode 100644 index 00000000..dd72e29b --- /dev/null +++ b/docs/user-guide/o11y-replay.md @@ -0,0 +1,103 @@ +# Offline o11y workload replay + +For users evaluating planner coverage using offline sketch-bench evidence. +`o11y_replay` runs the existing 27-query o11y fixture through lowering, +workload-wide candidate search, accuracy checks, selection and summary lifecycle +planning. It launches no data plane or downstream control-plane server. + +```sh +cargo run -p asap-devtools --bin o11y_replay -- --supplemental > replay.json +cargo run -p asap-devtools --bin o11y_replay -- \ + --supplemental --evidence planner-evidence.json --context context.json > empirical-replay.json +``` + +The first command compares exact requirements with the default approximate +planner (`--epsilon 0.01`). The second adds an empirical planning run using a +versioned offline evidence artifact and an explicit applicability context. +The context JSON contains `distribution`, `environment`, and +`now_unix_seconds`; copy the full descriptors of the intended offline dataset +and execution environment, and choose the evidence evaluation time explicitly. +Configuration, distribution, environment and validity dates must match. +An absent measurement stays unavailable and falls back to default planning. + +`--queries FILE` accepts one PromQL query per nonblank, noncomment line. +`--evaluations 60` models repeated reads of the same fixed historical input; +`--now-ms 1788825600000` fixes the as-of time. These are scenario assumptions, +not timings extracted from o11y task execution. Query windows, subqueries and +offsets remain encoded in the query IR. The lifecycle horizon is one hour and +the assumed data is at rest. `--supplemental` adds two quantile queries and a +`count_over_time` query as a separate corpus. Its total sample count has different +readout semantics from integer-stream point-frequency sketch-bench data; matching +sketch configuration does not establish matching query readout/error semantics. + +The JSON distinguishes: + +- `coverage`: whether a reachable site has a sketch candidate, exact summary + candidate, exact fallback, or a lowering rejection. Candidate coverage does + not establish that the whole query can execute from summaries. +- `root_plan` and `lifecycle_plan`: selected root structure and deployable + lifecycle result. Missing complete costs can make lifecycle planning retain + exact recomputation despite available sketch candidates. +- `offline_evidence`: matched primitive measurements and provenance, or an + explicit missing/incompatible/stale reason. Error statistics remain offline + observations for the measurement's recorded query, separate from the + planner's formal result guarantee. +- `heuristic_score`: a dimensionless planner score, never CPU nanoseconds. + Search and selection wall-clock timings are one local sample. Reporting and + materialization timings include JSON export work. +- End-to-end resource savings: `null` until complete raw execution, residual + operators, grouping cardinalities, sharing and deployment costs exist. Do not + divide heuristic scores to claim runtime speedup, or sum nested candidate + costs as a whole-query cost. + +The fixture identifies an upstream snapshot date, not an upstream commit; this +tool retains that limitation explicitly. It reuses the repository's existing +fixture, whose provenance is documented there. It does not claim to run the +upstream agent benchmark or its scenario data. + +## Measure supported exact-query reference implementations + +```sh +cargo run --release -p asap-devtools --bin o11y_exact_bench -- 300 60 > exact-snapshot.json +``` + +This profiles seven explicitly admitted o11y queries: instantaneous sums, +per-series window maxima, and a sum of per-series window averages. The synthetic +dataset has 300 series across three job labels, finite gauge values, and one +sample per minute inside the selected window. The 60 invocations repeat the +identical immutable snapshot and evaluation time. They are not advancing live +windows. Unsupported queries are reported as unavailable. + +The reference deployment retains the complete exact result of an admitted root +summary. It measures the raw value kernel and the retained result read separately +with a process CPU clock, and estimates one build plus repeated reads against +repeated raw execution. Both timed kernels include result allocation/destruction; +charging the build this way is conservative because its result is actually +retained. Only the profiled exact SummaryAgg signatures receive costs through +the public CostModel boundary; actual search, global selection, and root +materialization determine the reported choice. Unprofiled candidates and raw +fallback nodes never inherit those costs. + +The output identifies this as a Rust reference implementation, not the deployed +backend. It includes filtering and value reduction/readout but excludes disk, +network, protocol serialization and shared output-label materialization. Memory +is logical stored value bytes, not measured process RSS or a claim that raw data +can be deleted. Large savings from reusing identical results do not establish +the benefit of live sliding-window maintenance. + +## Compare query-matched sketch configurations + +```sh +cargo run -p asap-devtools --bin offline_recommend -- \ + tools/empirical-bench/results-sweep/comparison-evidence.json \ + tools/empirical-bench/results-sweep/request-uniform-are001.json +``` + +The companion comparison artifact includes disjoint construction, ingestion, +prepare and read CPU evidence for the exact frequency index and sketch rungs. +The request declares its offline observed-error criterion, fixed snapshot, +probe population, formal parameter minima if applicable, and resource weights. +The JSON reports accepted and rejected configurations, the exact reference, +selection, and dimensional tradeoffs. CPU-only and memory-weighted requests can +choose different plans. These point-frequency observations do not price or +bound error for the o11y gauge queries above. diff --git a/tools/empirical-bench/README.md b/tools/empirical-bench/README.md new file mode 100644 index 00000000..7e7a3463 --- /dev/null +++ b/tools/empirical-bench/README.md @@ -0,0 +1,110 @@ +# Offline sketch-bench evidence (developer guide) + +This driver runs ProjectASAP/sketch-bench's real `approxbench` CLI and adapts its +schema-v5 reports to the planner's versioned evidence schema. It measures CMS and +CountSketch using `asap_sketchlib` RegularPath/Vector2D plus an exact Polars +frequency baseline, on deterministic uniform and Zipf streams. No collector, +query backend, runtime ground truth, or runtime error feedback is involved. + +```bash +git clone https://github.com/ProjectASAP/sketch-bench.git /path/to/sketch-bench +git -C /path/to/sketch-bench checkout 87f619e843fd2e4da784160d4e205a0d0d55f032 +(cd /path/to/sketch-bench && cargo build --release --locked -p aqpbm-cli) +python3 tools/empirical-bench/run.py --bench-repo /path/to/sketch-bench --output /tmp/offline-evidence --sweep +python3 -m unittest discover -s tools/empirical-bench -p 'test_*.py' +``` + +Build from the sketch-bench directory so its `.cargo/config.toml` applies +`target-cpu=native`, as in the checked-in run. The driver records the source +revision, dirty status, executable checksum, full invocations, compiler, CPU, +OS, implementation, and parameters. It pins Polars to one worker. Five measured +runs follow two warmups per timed operation by default. Upstream accuracy executes +one offline truth comparison for the fixed generated dataset, recorded as +`error.trials=1`; it is run separately because accuracy of insert is undefined. +These timings are repeated observations +within one process, not independent experiments: standard deviations are reported, +but no confidence interval or cross-distribution guarantee is inferred. +`manifest.json.runtime_provenance` distinguishes observed host metadata and the +driver's enforced thread setting from declared build preconditions. The runtime +string's release/native/jemalloc settings describe the documented required build; +the driver does not independently recover compiler or allocator flags from the +executable. Its SHA-256 identifies that binary without proving those build flags. +The checked-in run used a shared development host without CPU affinity or an +exclusive core reservation; timing estimates should be remeasured on deployment +hardware before using them for capacity decisions. + +Outputs: + +- `raw.json`: unmodified per-invocation sketch-bench flat reports, including wall + times, CPU user/system samples, process RSS/allocator readings, and all errors. +- `manifest.json`: execution and environment provenance. +- `operation-reports.json`: original reports before upstream flattening; preserve + per-operation memory, including exact prepared-index state. +- `memory-probe.json`: requested-allocation samples with each live sketch, using + the same library and upstream data generator on identical inputs. +- `planner-evidence.json`: normalized sketch measurements, with unknowns null. +- `exact-baselines.json`: exact frequency index costs on the same input. +- `resource-probe.json`: disjoint live-state construction/update/read/merge CPU, + actual serialized snapshot size and allocated filesystem blocks. +- `comparison-evidence.json`: query-bound sketch records and exact baselines; + its required `disjoint_live_state_v1` timing contract excludes duplicate setup + and destruction charges. +- `request-*.json`: fixed-snapshot CPU-only comparisons at 1%/5% observed mean + relative error, plus an explicitly illustrative memory-weighted comparison. + +The default sketch parameters match formal planner sizing for epsilon=0.01, delta=0.01: +CMS width 272, depth 5; CountSketch width 30,000, depth 83. Input defaults to +20,000 i64 keys, key-space size 1,000, seed 42; Zipf exponent is 1.1. Actual +distinct-key counts come from the ground-truth probe population. Errors are +average absolute relative point-frequency errors over **all distinct keys**. +They are not error of a total COUNT, or a formal epsilon bound. Aggregate error +over repeated deterministic inputs does not establish a confidence interval. +`--sweep` additionally measures CMS widths 512/2720/4096/27200/32768 (depth 5) +and CountSketch widths 300/3000 (depth 83). The power-of-two CMS widths support +the backend frequency extension's actual parameter constraints. An offline +accuracy threshold does not authorize deployment below formal minimum sizes. + +Original upstream CPU reports use paired user+system samples and preserve wrapper +allocation/destruction overhead. The current comparison exporter instead uses +`resource_probe.rs`, linked to the exact release libraries and jemalloc. It times +live-state phases separately with `CLOCK_PROCESS_CPUTIME_ID`: empty constructor, +updates, exact prepare, reads, and sketch merge. Holder allocation and destruction +are outside the constructor timer; constructors/destructors are outside the other +phase timers. Queries cover every distinct key ten times against an unchanged +snapshot, in a reproducible rotated sorted order. The exact implementation is +the upstream public `PolarsFrequencyCore`, not a replacement algorithm. +The model's scope ends with state retained after reading; retirement is excluded +on both sides. Wall time remains in upstream raw reports and is never called CPU. + +`retained_bytes` and `peak_bytes` use the companion `memory_probe.rs`, linked to +the exact release libraries built by sketch-bench. Its counting System allocator +measures requested heap allocation bytes across construction and insertion, +keeping the sketch alive at the final snapshot; input generation is outside +the measurement. This is independent of allocator-resident pages and does not +measure jemalloc overhead. Five runs must release every sketch allocation after +destruction. CPU results come from a separate uninstrumented jemalloc probe. +The exact heap probe warms Polars twice, then measures construction/ingestion/ +prepare with the exact state alive. Its readings are accepted only when every +post-destruction allocation balance returns to zero; otherwise the exact footprint +stays explicitly formula based. `--export-only --refresh-memory` refreshes this +heap evidence without rerunning or replacing CPU timings. +Upstream counter-storage formula, process RSS and allocator readings remain in +raw reports only. The resource probe calls the actual `serialize_to_bytes` API +and verifies estimate-equivalent deserialization for every input key. It writes +one snapshot to a fresh local temporary file, flushes it, and records allocated +blocks times 512 separately from logical byte length; the file is then removed. +Directory/inode overhead and a runtime write schedule are outside this disk +measurement. State bytes are never substituted for disk usage. Validity is a +30-day reproducibility policy, not a statistical claim of future applicability. + +The exact baseline inserts the input into a buffer, then `prepare` executes +Polars group-by/count and creates a HashMap. Reads query that prepared exact +index. Compare `empty_build + (insert_per_item * N) + prepare + Q * read` with +sketch `empty_build + (update_per_item * N) + Q * read`. All components use +disjoint timed regions. A sketch can save state while losing CPU to this exact index. +These comparisons are offline point-frequency microbenchmarks; they do not +measure an o11y PromQL query or end-to-end deployed speedup. + +`results/` preserves the earlier partial run whose constructor/disk/serialization +were unknown. `results-sweep/` contains the complete frequency component run; +its additional probe must not retroactively change the earlier measurements. diff --git a/tools/empirical-bench/memory_probe.rs b/tools/empirical-bench/memory_probe.rs new file mode 100644 index 00000000..7564fbe4 --- /dev/null +++ b/tools/empirical-bench/memory_probe.rs @@ -0,0 +1,101 @@ +//! Counts requested allocation bytes with each sketch alive; input generation is excluded. +use std::alloc::{GlobalAlloc, Layout, System}; +use std::sync::atomic::{AtomicUsize, Ordering::Relaxed}; +use asap_sketchlib::{Count, CountMin, DataInput, RegularPath, Vector2D}; + +struct Tracking; +static LIVE: AtomicUsize = AtomicUsize::new(0); +static PEAK: AtomicUsize = AtomicUsize::new(0); +fn account(bytes: usize) { + let live = LIVE.fetch_add(bytes, Relaxed) + bytes; + PEAK.fetch_max(live, Relaxed); +} +unsafe impl GlobalAlloc for Tracking { + unsafe fn alloc(&self, layout: Layout) -> *mut u8 { + let ptr = unsafe { System.alloc(layout) }; + if !ptr.is_null() { account(layout.size()); } + ptr + } + unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { + let ptr = unsafe { System.alloc_zeroed(layout) }; + if !ptr.is_null() { account(layout.size()); } + ptr + } + unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { + unsafe { System.dealloc(ptr, layout) }; + LIVE.fetch_sub(layout.size(), Relaxed); + } + unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, size: usize) -> *mut u8 { + let next = unsafe { System.realloc(ptr, layout, size) }; + if !next.is_null() { + if size >= layout.size() { account(size - layout.size()); } + else { LIVE.fetch_sub(layout.size() - size, Relaxed); } + } + next + } +} +#[global_allocator] +static ALLOCATOR: Tracking = Tracking; + +fn main() { + let path = std::env::args().nth(1).expect("raw.json path"); + let rows: Vec = serde_json::from_slice(&std::fs::read(path).unwrap()).unwrap(); + let mut results = Vec::new(); + for row in rows { + let description: aqpbm_datagen::TableDescription = serde_json::from_value(row["workload"]["synthetic"]["description"].clone()).unwrap(); + let items = description.generate().unwrap().into_column(0).unwrap().into_i64().unwrap(); + if row["impl"] == "polars" { + use sketch_bench::wrappers::polars_shared::PolarsFrequencyCore; + // Initialize Polars' worker/cache state before attributing bytes to one live index. + for _ in 0..2 { + let mut warm = PolarsFrequencyCore::::default(); + for item in &items { warm.update(item); } + warm.finalize(); + } + let mut samples = Vec::with_capacity(5); + let mut cleanup_deltas = Vec::with_capacity(5); + for _ in 0..5 { + let baseline = LIVE.load(Relaxed); + PEAK.store(baseline, Relaxed); + let mut state = PolarsFrequencyCore::::default(); + for item in &items { state.update(item); } + state.finalize(); + std::hint::black_box(&state); + let sample = (LIVE.load(Relaxed).saturating_sub(baseline), PEAK.load(Relaxed).saturating_sub(baseline)); + drop(state); + cleanup_deltas.push(LIVE.load(Relaxed) as i64 - baseline as i64); + samples.push(sample); + } + results.push(serde_json::json!({"sketch": row["sketch"], "impl": "polars", + "workload": row["workload"], "sketch_config": row["sketch_config"], "samples": samples, + "cleanup_deltas": cleanup_deltas, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages"})); + continue; + } + let depth = row["sketch_config"]["params"]["rows"].as_u64().unwrap() as usize; + let width = row["sketch_config"]["params"]["cols"].as_u64().unwrap() as usize; + let cms = row["sketch"].as_str().unwrap().starts_with("cms-"); + let mut samples = Vec::with_capacity(5); + for _ in 0..5 { + let baseline = LIVE.load(Relaxed); + PEAK.store(baseline, Relaxed); + // The sketch remains alive at both snapshots, unlike a consuming benchmark closure. + let (retained, peak) = if cms { + let mut sketch = CountMin::, RegularPath>::with_dimensions(depth, width); + for item in &items { sketch.insert(&DataInput::I64(*item)); } + std::hint::black_box(&sketch); + (LIVE.load(Relaxed) - baseline, PEAK.load(Relaxed) - baseline) + } else { + let mut sketch = Count::, RegularPath>::with_dimensions(depth, width); + for item in &items { sketch.insert(&DataInput::I64(*item)); } + std::hint::black_box(&sketch); + (LIVE.load(Relaxed) - baseline, PEAK.load(Relaxed) - baseline) + }; + assert_eq!(LIVE.load(Relaxed), baseline, "sketch destruction must release its allocations"); + samples.push((retained, peak)); + } + results.push(serde_json::json!({"sketch": row["sketch"], "impl": "lib", "workload": row["workload"], "sketch_config": row["sketch_config"], + "samples": samples, "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages"})); + } + println!("{}", serde_json::to_string_pretty(&results).unwrap()); +} diff --git a/tools/empirical-bench/resource_probe.rs b/tools/empirical-bench/resource_probe.rs new file mode 100644 index 00000000..e1a17629 --- /dev/null +++ b/tools/empirical-bench/resource_probe.rs @@ -0,0 +1,138 @@ +//! Complements sketch-bench with empty construction CPU and actual persisted snapshot size. +use std::hint::black_box; +use std::io::Write; +use std::os::unix::fs::MetadataExt; +use asap_sketchlib::{Count, CountMin, DataInput, RegularPath, Vector2D}; + +#[global_allocator] +static ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; + +fn cpu_ns() -> u64 { + #[repr(C)] + struct Timespec { tv_sec: std::os::raw::c_long, tv_nsec: std::os::raw::c_long } + extern "C" { fn clock_gettime(clock_id: std::os::raw::c_int, time: *mut Timespec) -> std::os::raw::c_int; } + // Linux CLOCK_PROCESS_CPUTIME_ID; this companion also uses Linux allocated blocks. + assert!(cfg!(target_os = "linux")); + let mut time = Timespec { tv_sec: 0, tv_nsec: 0 }; + assert_eq!(unsafe { clock_gettime(2, &mut time) }, 0); + time.tv_sec as u64 * 1_000_000_000 + time.tv_nsec as u64 +} + +fn construction(mut build: impl FnMut() -> T, batch: usize) -> Vec { + let mut samples = Vec::with_capacity(5); + for run in 0..7 { + let mut alive = Vec::with_capacity(batch); + let start = cpu_ns(); + for _ in 0..batch { alive.push(black_box(build())); } + let elapsed = cpu_ns() - start; + if run >= 2 { samples.push(elapsed as f64 / batch as f64); } + // Empty objects remain alive until after the timed construction batch. + black_box(&alive); + drop(alive); + } + samples +} + +fn live_phases(items: &[i64], build: impl Fn() -> T, insert: impl Fn(&mut T, i64), + read: impl Fn(&T, i64) -> f64, prepare: impl Fn(&mut T), + merge: Option) -> serde_json::Value { + let mut keys: Vec<_> = items.iter().copied().collect::>().into_iter().collect(); + // Fixed rotation avoids sorted probe order without introducing another RNG definition. + if !keys.is_empty() { let mid = keys.len() / 2; keys.rotate_left(mid); } + let mut updates = Vec::with_capacity(5); + let mut prepares = Vec::with_capacity(5); + let mut reads = Vec::with_capacity(5); + let mut merges = Vec::with_capacity(5); + for run in 0..7 { + let mut state = build(); + let start = cpu_ns(); + for item in items { insert(&mut state, black_box(*item)); } + let update = (cpu_ns() - start) as f64 / items.len() as f64; + let start = cpu_ns(); + prepare(&mut state); + let prepare = (cpu_ns() - start) as f64; + let start = cpu_ns(); + for _ in 0..10 { for key in &keys { black_box(read(&state, black_box(*key))); } } + let query = (cpu_ns() - start) as f64 / (keys.len() * 10) as f64; + let merge_time = merge.map(|merge| { + let mut other = build(); + for item in items { insert(&mut other, *item); } + let start = cpu_ns(); + merge(&mut state, &other); + (cpu_ns() - start) as f64 + }); + if run >= 2 { + updates.push(update); prepares.push(prepare); reads.push(query); + if let Some(time) = merge_time { merges.push(time); } + } + black_box(&state); + } + serde_json::json!({"update_cpu_ns_samples": updates, "prepare_cpu_ns_samples": prepares, + "read_cpu_ns_samples": reads, "merge_cpu_ns_samples": merges, + "query_distinct_keys": keys.len(), "query_passes": 10, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order"}) +} + +fn main() { + let args: Vec = std::env::args().collect(); + let rows: Vec = serde_json::from_slice(&std::fs::read(&args[1]).unwrap()).unwrap(); + let directory = std::path::Path::new(&args[2]); + let mut results = Vec::new(); + for (index, row) in rows.into_iter().enumerate() { + let description: aqpbm_datagen::TableDescription = serde_json::from_value(row["workload"]["synthetic"]["description"].clone()).unwrap(); + let items = description.generate().unwrap().into_column(0).unwrap().into_i64().unwrap(); + if row["impl"] == "polars" { + use sketch_bench::wrappers::polars_shared::PolarsFrequencyCore; + let samples = construction(PolarsFrequencyCore::::default, 4096); + let phases = live_phases(&items, PolarsFrequencyCore::::default, + |s, x| s.update(&x), |s, x| s.query(&x) as f64, |s| s.finalize(), None); + results.push(serde_json::json!({"sketch": row["sketch"], "impl": row["impl"], + "workload": row["workload"], "sketch_config": row["sketch_config"], + "build_cpu_ns_samples": samples, "build_batch": 4096, + "phases": phases, + "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded"})); + continue; + } + let depth = row["sketch_config"]["params"]["rows"].as_u64().unwrap() as usize; + let width = row["sketch_config"]["params"]["cols"].as_u64().unwrap() as usize; + let batch = (16_000_000 / (depth * width * 4)).clamp(2, 256); + let (samples, serialized, phases) = if row["sketch"].as_str().unwrap().starts_with("cms-") { + let samples = construction(|| CountMin::, RegularPath>::with_dimensions(depth, width), batch); + let phases = live_phases(&items, || CountMin::, RegularPath>::with_dimensions(depth, width), + |s,x| s.insert(&DataInput::I64(x)), |s,x| s.estimate(&DataInput::I64(x)) as f64, |_| {}, Some(CountMin::, RegularPath>::merge)); + let mut sketch = CountMin::, RegularPath>::with_dimensions(depth, width); + for item in &items { sketch.insert(&DataInput::I64(*item)); } + let bytes = sketch.serialize_to_bytes().unwrap(); + let restored = CountMin::, RegularPath>::deserialize_from_bytes(&bytes).unwrap(); + for item in &items { assert_eq!(sketch.estimate(&DataInput::I64(*item)), restored.estimate(&DataInput::I64(*item))); } + (samples, bytes, phases) + } else { + let samples = construction(|| Count::, RegularPath>::with_dimensions(depth, width), batch); + let phases = live_phases(&items, || Count::, RegularPath>::with_dimensions(depth, width), + |s,x| s.insert(&DataInput::I64(x)), |s,x| s.estimate(&DataInput::I64(x)), |_| {}, Some(Count::, RegularPath>::merge)); + let mut sketch = Count::, RegularPath>::with_dimensions(depth, width); + for item in &items { sketch.insert(&DataInput::I64(*item)); } + let bytes = sketch.serialize_to_bytes().unwrap(); + let restored = Count::, RegularPath>::deserialize_from_bytes(&bytes).unwrap(); + for item in &items { assert_eq!(sketch.estimate(&DataInput::I64(*item)), restored.estimate(&DataInput::I64(*item))); } + (samples, bytes, phases) + }; + let path = directory.join(format!("snapshot-{index}.msgpack")); + let mut file = std::fs::OpenOptions::new().write(true).create_new(true).open(&path).unwrap(); + file.write_all(&serialized).unwrap(); + file.sync_all().unwrap(); + let metadata = file.metadata().unwrap(); + assert_eq!(metadata.len(), serialized.len() as u64); + let disk_bytes = metadata.blocks() * 512; + drop(file); + std::fs::remove_file(path).unwrap(); + results.push(serde_json::json!({"sketch": row["sketch"], "impl": row["impl"], + "workload": row["workload"], "sketch_config": row["sketch_config"], + "build_cpu_ns_samples": samples, "build_batch": batch, + "phases": phases, + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "serialized_bytes": serialized.len(), "disk_bytes": disk_bytes, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand"})); + } + println!("{}", serde_json::to_string_pretty(&results).unwrap()); +} diff --git a/tools/empirical-bench/run.py b/tools/empirical-bench/run.py new file mode 100644 index 00000000..cd56d756 --- /dev/null +++ b/tools/empirical-bench/run.py @@ -0,0 +1,367 @@ +#!/usr/bin/env python3 +"""Run the real sketch-bench CLI and export offline planner evidence (stdlib only).""" +import argparse +import datetime +import hashlib +import json +import math +import os +from pathlib import Path +import platform +import shlex +import statistics +import subprocess +import tempfile + + +BUILD_PROVENANCE = { + "runtime_field_status": "declared build preconditions, not introspected from the executable", + "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", + "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", + "declared_settings": "release; repository target-cpu=native; default jemalloc", + "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", + "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings", +} + + +def command(argv, **kwargs): + return subprocess.check_output(argv, text=True, **kwargs).strip() + + +def measurement(values): + if not values or any(not math.isfinite(x) or x < 0 for x in values): + raise ValueError("invalid or missing measurement") + return {"value": statistics.mean(values), + "stddev": statistics.stdev(values) if len(values) > 1 else None, + "samples": len(values)} + + +def cpu_per_op(row, op): + """Recover each run's work from paired rate and elapsed samples, as upstream does.""" + rate = row.get(op + ("_folds_per_sec" if op == "merge" else "_throughput_items_per_sec")) + cpu = row.get(op + "_cpu_time_ms") + wall = row.get(op + "_wall_time_ms") + if not rate or not cpu or not wall: + return None + samples = [rate["samples"], wall["samples"], cpu["user_ms"]["samples"], cpu["sys_ms"]["samples"]] + if len({len(x) for x in samples}) != 1: + raise ValueError("unaligned CPU/rate/time samples") + values = [] + for r, elapsed, user, system in zip(*samples): + work = r * elapsed / 1000 + if work <= 0: + raise ValueError("zero benchmark work") + values.append((user + system) * 1_000_000 / work) + result = measurement(values) + result["method"] = "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per " + ("binary merge" if op == "merge" else "input item" if op == "insert" else "point-frequency key lookup") + return result + + +def cpu_batch(row, op): + cpu = row.get(op + "_cpu_time_ms") + if not cpu: + return None + return measurement([(u + s) * 1_000_000 for u, s in + zip(cpu["user_ms"]["samples"], cpu["sys_ms"]["samples"])]) + + +def export(raw, manifest, operation_reports, memory_rows, resource_rows=None): + records, baselines = [], [] + if not (len(raw) == len(manifest["invocations"]) == len(operation_reports)): + raise ValueError("misaligned invocation reports") + for row, invocation, operations in zip(raw, manifest["invocations"], operation_reports): + if row["schema_version"] != 5: + raise ValueError("adapter requires sketch-bench schema 5") + accuracy = row["query_accuracy"] + resource = next((r for r in (resource_rows or []) if r["sketch"] == row["sketch"] + and r["impl"] == row["impl"] and r["sketch_config"] == row["sketch_config"] + and r["workload"] == row["workload"]), None) + if resource_rows is not None and (resource is None or "phases" not in resource): + raise ValueError("complete comparison requires matched disjoint live-state phase measurements for every record") + def phase_metric(phase): + return (dict(measurement(resource["phases"][phase + "_cpu_ns_samples"]), method=resource["phases"]["method"]) + if resource and resource.get("phases") else None) + shape = row["workload"]["synthetic"]["description"] + distribution = {"id": invocation["distribution_id"], + "family": invocation["distribution"], + "sample_count": shape["row_num"], + "distinct_count": int(accuracy["probes_all"]), + "parameters": shape["column_spec"][0]["distribution"]} + if invocation["algorithm"] == "Exact": + exact_memory = next((m for m in memory_rows if m.get("impl") == "polars" and m["workload"] == row["workload"]), None) + baselines.append({"distribution": distribution, "implementation": "polars exact group_by + HashMap", + "insert_cpu_ns_per_item": phase_metric("update") or cpu_per_op(row, "insert"), + "prepare_cpu_ns_per_dataset": phase_metric("prepare") or cpu_batch(row, "prepare"), + "read_cpu_ns_per_key": phase_metric("read") or cpu_per_op(row, "query"), + "retained_bytes": max(r["bench"]["memory_bytes"] for r in operations + if r["bench"].get("operation") == "query"), + "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", + "accuracy": accuracy}) + baselines[-1]["empty_build_cpu_ns"] = (dict(measurement(resource["build_cpu_ns_samples"]), method=resource["build_method"]) + if resource else None) + if exact_memory and all(delta == 0 for delta in exact_memory["cleanup_deltas"]): + baselines[-1]["retained_heap_bytes"] = dict(measurement([s[0] for s in exact_memory["samples"]]), method=exact_memory["method"]) + baselines[-1]["peak_heap_bytes"] = dict(measurement([s[1] for s in exact_memory["samples"]]), method=exact_memory["method"]) + continue + algorithm = invocation["algorithm"] + memory = next(m for m in memory_rows if m["sketch"] == row["sketch"] and m["workload"] == row["workload"] + and (m.get("sketch_config", row["sketch_config"]) == row["sketch_config"])) + params = row["sketch_config"]["params"] + timestamp = row["insert_timestamp"] + if not timestamp.endswith("Z"): + raise ValueError("expected upstream UTC timestamp") + measured = int(datetime.datetime.fromisoformat(timestamp[:19] + "+00:00").timestamp()) + environment = dict(manifest["environment"]) + environment["implementation"] = "asap_sketchlib RegularPath Vector2D" + # The algorithm distinguishes families; storage/hash path must also match. + environment["id"] = hashlib.sha256(json.dumps(environment, sort_keys=True).encode()).hexdigest()[:16] + records.append({"id": invocation["id"], "algorithm": algorithm, + "params": {algorithm: {"width": params["cols"], "depth": params["rows"]}}, + "distribution": distribution, "environment": environment, + "measured_at_unix_seconds": measured, + "valid_until_unix_seconds": measured + 30 * 86400, + "provenance": {"command": shlex.join(invocation["argv"]), + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": manifest["source_revision"], + "repetitions": row["runs"]}, + "metrics": {"build_cpu_ns": (dict(measurement(resource["build_cpu_ns_samples"]), method=resource["build_method"]) + if resource else None), + "update_cpu_ns": phase_metric("update") or cpu_per_op(row, "insert"), + "merge_cpu_ns": phase_metric("merge") or cpu_per_op(row, "merge"), + "read_cpu_ns": phase_metric("read") or cpu_per_op(row, "query"), + "retained_bytes": dict(measurement([float(s[0]) for s in memory["samples"]]), method=memory["method"]), + "peak_bytes": dict(measurement([float(s[1]) for s in memory["samples"]]), method=memory["method"]), + "serialized_bytes": (dict(measurement([resource["serialized_bytes"]]), method="actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key") if resource else None), + "disk_bytes": (dict(measurement([resource["disk_bytes"]]), method=resource["disk_method"]) if resource else None)}, + "error": {"metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": accuracy["are_all"], "max": None, + "trials": int(accuracy.get("accuracy_runs", 1)), + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": {"kind": "point_frequency", "value_type": "i64", + "accuracy_stddev": accuracy.get("are_all_stddev"), + "full_accuracy": accuracy}}}) + return {"schema_version": 1, + "benchmark_version": "sketch-bench@" + manifest["source_revision"] + ("; adapter-v2-disjoint" if resource_rows else "; adapter-v1"), + "model_version": "empirical-update-cpu-v1", "records": records}, baselines + + +def comparison_artifact(artifact, baselines, manifest): + query = {"kind": "point_frequency", "value_type": "i64", "probe_set": "all_distinct_keys"} + exact_records = [] + for baseline in baselines: + if baseline["empty_build_cpu_ns"] is None: + continue + reference = next(r for r in artifact["records"] if r["distribution"] == baseline["distribution"]) + environment = dict(manifest["environment"]) + environment["implementation"] = "polars group_by + std HashMap" + environment["implementation_version"] = "polars 0.46.0" + environment["id"] = hashlib.sha256(json.dumps(environment, sort_keys=True).encode()).hexdigest()[:16] + invocation = next(i for i in manifest["invocations"] if i["algorithm"] == "Exact" + and i["distribution_id"] == baseline["distribution"]["id"]) + exact_records.append({"id": invocation["id"], "distribution": baseline["distribution"], + "environment": environment, "query": query, + "measured_at_unix_seconds": reference["measured_at_unix_seconds"], + "valid_until_unix_seconds": reference["valid_until_unix_seconds"], + "provenance": {"command": shlex.join(invocation["argv"]), + "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", + "source_revision": manifest["source_revision"], "repetitions": 5}, + "metrics": {"empty_build_cpu_ns": baseline["empty_build_cpu_ns"], + "update_cpu_ns": baseline["insert_cpu_ns_per_item"], + "prepare_cpu_ns": baseline["prepare_cpu_ns_per_dataset"], + "read_cpu_ns": baseline["read_cpu_ns_per_key"], + "retained_bytes": baseline.get("retained_heap_bytes") or dict(measurement([baseline["retained_bytes"]]), method=baseline["retained_bytes_method"]), + "peak_bytes": baseline.get("peak_heap_bytes")}}) + return {"schema_version": 1, "timing_contract": "disjoint_live_state_v1", "sketch_evidence": artifact, + "query_bindings": [{"record_id": r["id"], "query": query} for r in artifact["records"]], + "exact_records": exact_records} + + +def refresh_memory(bench_repo, raw_path, memory_path): + deps = bench_repo.resolve() / "target/release/deps" + with tempfile.TemporaryDirectory(prefix="asap-memory-probe-") as temporary: + executable = str(Path(temporary) / "memory-probe") + argv = ["rustc", "--edition=2021", "-C", "opt-level=3", "-C", "panic=abort", "-C", "target-cpu=native", + "-L", f"dependency={deps}", str(Path(__file__).with_name("memory_probe.rs")), "-o", executable] + for name in ["asap_sketchlib", "aqpbm_datagen", "serde_json", "sketch_bench"]: + candidates = list(deps.glob(f"lib{name}-*.rlib")) + if len(candidates) != 1: + raise ValueError(f"expected one pinned release library for {name}, got {len(candidates)}") + argv += ["--extern", f"{name}={candidates[0]}"] + for pattern in ["*/out", "*/out/lib"]: + for native in (bench_repo.resolve() / "target/release/build").glob(pattern): + argv += ["-L", f"native={native}"] + subprocess.check_call(argv) + memory_path.write_text(command([executable, str(raw_path)], env=dict(os.environ, POLARS_MAX_THREADS="1")) + "\n") + return {"source_sha256": hashlib.sha256(Path(__file__).with_name("memory_probe.rs").read_bytes()).hexdigest(), + "compile_argv": argv, + "allocator": "System + requested-byte tracking; separate from uninstrumented jemalloc CPU measurements"} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--bench-repo", required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + parser.add_argument("--size", type=int, default=20000) + parser.add_argument("--cardinality", type=int, default=1000) + parser.add_argument("--runs", type=int, default=5) + parser.add_argument("--sweep", action="store_true", help="measure three widths per frequency family") + parser.add_argument("--export-only", action="store_true") + parser.add_argument("--refresh-memory", action="store_true", help="with --export-only, remeasure heap without rerunning CPU timings") + parser.add_argument("--resume", action="store_true", help="continue a partially completed run with identical parameters") + args = parser.parse_args() + if args.refresh_memory and not args.export_only: + parser.error("--refresh-memory requires --export-only") + args.output.mkdir(parents=True, exist_ok=True) + manifest_path = args.output / "manifest.json" + raw_path = args.output / "raw.json" + operations_path = args.output / "operation-reports.json" + if args.export_only: + manifest, raw = json.loads(manifest_path.read_text()), json.loads(raw_path.read_text()) + operation_reports = json.loads(operations_path.read_text()) + else: + if (raw_path.exists() or manifest_path.exists()) and not args.resume: + parser.error("output already contains a run; use a new directory or --export-only") + repo = args.bench_repo.resolve() + if 'name = "asap_sketchlib"\nversion = "0.2.2"' not in (repo / "Cargo.lock").read_text(): + parser.error("adapter is validated with asap_sketchlib 0.2.2; do not relabel another version") + binary = repo / "target/release/approxbench" + cpu = next((line.split(":", 1)[1].strip() for line in Path("/proc/cpuinfo").read_text().splitlines() + if line.startswith("model name")), platform.processor()) + manifest = {"source_revision": command(["git", "rev-parse", "HEAD"], cwd=repo), + "source_dirty": bool(command(["git", "status", "--porcelain"], cwd=repo)), + "environment": {"cpu": cpu, "os": platform.platform(), + "runtime": command(["rustc", "--version"]) + "; release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2"}, + "binary_sha256": hashlib.sha256(binary.read_bytes()).hexdigest(), + "runtime_provenance": BUILD_PROVENANCE, + "invocations": []} + raw, operation_reports = [], [] + if args.resume: + previous = json.loads(manifest_path.read_text()) + if previous["binary_sha256"] != manifest["binary_sha256"] or previous["environment"] != manifest["environment"]: + parser.error("resume requires the same binary and environment") + manifest, raw = previous, json.loads(raw_path.read_text()) + operation_reports = json.loads(operations_path.read_text()) + for invocation in manifest["invocations"]: + argv = invocation["argv"] + if any(argv[argv.index(flag) + 1] != str(value) for flag, value in + [("--size", args.size), ("--cardinality", args.cardinality), ("--runs", args.runs)]): + parser.error("resume requires the same size, cardinality, and runs") + env = dict(os.environ, POLARS_MAX_THREADS="1") + for distribution in ["uniform", "zipf"]: + targets = [ + ("Cms", "cms-regularpath-vector2d", "lib", 5, 272), + ("CountSketch", "countsketch-regularpath-vector2d", "lib", 83, 30000), + ("Exact", "cms", "polars", 5, 272)] + if args.sweep: + targets += [("Cms", "cms-regularpath-vector2d", "lib", 5, width) for width in [2720, 27200, 512, 4096, 32768]] + targets += [("CountSketch", "countsketch-regularpath-vector2d", "lib", 83, width) for width in [300, 3000]] + for algorithm, variant, library, rows, cols in targets: + record_id = f"{algorithm.lower()}-{distribution}-seed42" + (f"-w{cols}-d{rows}" if args.sweep else "") + if any(i["id"] == record_id for i in manifest["invocations"]): + continue + argv = [str(binary), "sketchbench", "--variant", variant, "--library", library, + "--config", f"rows={rows} cols={cols}", "--dataset", distribution, + "--size", str(args.size), "--cardinality", str(args.cardinality), + "--dtype", "i64", "--seed", "42", "--runs", str(args.runs), + "--warmup-runs", "2", "--operations", + "insert,query" if algorithm == "Exact" else "insert,query,merge", + "--metrics", "throughput,cpu,memory"] + if distribution == "zipf": + argv += ["--zipf-s", "1.1"] + print(shlex.join(argv), flush=True) + output = command(argv, env=env) + accuracy_argv = list(argv) + accuracy_argv[accuracy_argv.index("--operations") + 1] = "query" + accuracy_argv[accuracy_argv.index("--metrics") + 1] = "accuracy" + output += "\n" + command(accuracy_argv, env=env) + prepare_argv = None + if algorithm == "Exact": + prepare_argv = list(argv) + prepare_argv[prepare_argv.index("--operations") + 1] = "prepare" + prepare_argv[prepare_argv.index("--metrics") + 1] = "latency,cpu,memory" + output += "\n" + command(prepare_argv, env=env) + operations = [json.loads(line) for line in output.splitlines() if line.strip()] + row = json.loads(command([str(binary), "flatten"], input=output, env=env)) + raw.append(row) + operation_reports.append(operations) + manifest["invocations"].append({"id": record_id, + "distribution_id": f"{distribution}-n{args.size}-c{args.cardinality}-seed42", + "distribution": distribution, "algorithm": algorithm, "argv": argv, + "accuracy_argv": accuracy_argv, "prepare_argv": prepare_argv}) + raw_path.write_text(json.dumps(raw, indent=2) + "\n") + manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") + operations_path.write_text(json.dumps(operation_reports, indent=2) + "\n") + memory_path = args.output / "memory-probe.json" + resources_path = args.output / "resource-probe.json" + if not args.export_only: + # Older partial runs may lack prepare: CPU/memory alone select no upstream timing pass. + for index, (row, invocation) in enumerate(zip(raw, manifest["invocations"])): + if invocation["algorithm"] == "Exact" and not row.get("prepare_cpu_time_ms"): + prepare_argv = list(invocation["argv"]) + prepare_argv[prepare_argv.index("--operations") + 1] = "prepare" + prepare_argv[prepare_argv.index("--metrics") + 1] = "latency,cpu,memory" + output = command(prepare_argv, env=env) + operation_reports[index].extend(json.loads(line) for line in output.splitlines() if line.strip()) + raw[index] = json.loads(command([str(binary), "flatten"], + input="\n".join(json.dumps(r) for r in operation_reports[index]), env=env)) + invocation["prepare_argv"] = prepare_argv + raw_path.write_text(json.dumps(raw, indent=2) + "\n") + operations_path.write_text(json.dumps(operation_reports, indent=2) + "\n") + deps = args.bench_repo.resolve() / "target/release/deps" + manifest["memory_probe"] = refresh_memory(args.bench_repo, raw_path, memory_path) + with tempfile.TemporaryDirectory(prefix="asap-resource-probe-") as temporary: + executable = str(Path(temporary) / "resource-probe") + argv = ["rustc", "--edition=2021", "-C", "opt-level=3", "-C", "panic=abort", "-C", "target-cpu=native", + "-L", f"dependency={deps}", str(Path(__file__).with_name("resource_probe.rs")), "-o", executable] + for name in ["asap_sketchlib", "aqpbm_datagen", "serde_json", "tikv_jemallocator", "sketch_bench"]: + candidates = list(deps.glob(f"lib{name}-*.rlib")) + if len(candidates) != 1: + raise ValueError(f"expected one pinned release library for {name}, got {len(candidates)}") + argv += ["--extern", f"{name}={candidates[0]}"] + for native in (args.bench_repo.resolve() / "target/release/build").glob("tikv-jemalloc-sys-*/out/lib"): + argv += ["-L", f"native={native}"] + for native in (args.bench_repo.resolve() / "target/release/build").glob("*/out"): + argv += ["-L", f"native={native}"] + subprocess.check_call(argv) + resources_path.write_text(command([executable, str(raw_path), temporary], env=env) + "\n") + manifest["resource_probe"] = {"source_sha256": hashlib.sha256(Path(__file__).with_name("resource_probe.rs").read_bytes()).hexdigest(), + "compile_argv": argv, "allocator": "jemalloc", "disk_filesystem_path": tempfile.gettempdir()} + manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") + if args.refresh_memory: + if hashlib.sha256((args.bench_repo.resolve() / "target/release/approxbench").read_bytes()).hexdigest() != manifest["binary_sha256"]: + parser.error("memory refresh requires the original benchmark binary") + manifest["memory_probe"] = refresh_memory(args.bench_repo, raw_path, memory_path) + manifest["runtime_provenance"] = BUILD_PROVENANCE + manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") + artifact, baselines = export(raw, manifest, operation_reports, json.loads(memory_path.read_text()), + json.loads(resources_path.read_text()) if resources_path.exists() else None) + (args.output / "planner-evidence.json").write_text(json.dumps(artifact, indent=2) + "\n") + (args.output / "exact-baselines.json").write_text(json.dumps(baselines, indent=2) + "\n") + if resources_path.exists(): + comparison = comparison_artifact(artifact, baselines, manifest) + (args.output / "comparison-evidence.json").write_text(json.dumps(comparison, indent=2) + "\n") + for exact in comparison["exact_records"]: + row = next(r for r in artifact["records"] if r["distribution"] == exact["distribution"]) + for budget, suffix in [(0.01, "001"), (0.05, "005")]: + request = {"context": {"distribution": row["distribution"], "environment": row["environment"], + "now_unix_seconds": max(r["measured_at_unix_seconds"] for r in artifact["records"])}, + "exact_environment": exact["environment"], "query": exact["query"], + "accuracy": {"metric": row["error"]["metric"], "max_observed_mean": budget, "minimum_trials": 1}, + "workload": {"input_items_per_state": row["distribution"]["sample_count"], + "reads_per_state": 1000, "merges_per_state": 0, "state_instances": 1, "horizon_seconds": 300.0}, + "weights": {"cpu_ns_weight": 1.0, "retained_byte_seconds_weight": 0.0}, "formal_minimums": None} + (args.output / ("request-" + row["distribution"]["family"] + "-are" + suffix + ".json")).write_text(json.dumps(request, indent=2) + "\n") + request["accuracy"]["max_observed_mean"] = 0.01 + request["weights"]["retained_byte_seconds_weight"] = 0.01 + request["formal_minimums"] = [{"algorithm": "Cms", "params": {"Cms": {"width": 512, "depth": 5}}}] + (args.output / ("request-" + row["distribution"]["family"] + "-memory-weighted.json")).write_text(json.dumps(request, indent=2) + "\n") + for row in artifact["records"]: + context = {"distribution": row["distribution"], "environment": row["environment"], + "now_unix_seconds": max(r["measured_at_unix_seconds"] for r in artifact["records"])} + (args.output / ("context-" + row["distribution"]["family"] + ".json")).write_text(json.dumps(context, indent=2) + "\n") + print(f"Exported {len(artifact['records'])} sketch records and {len(baselines)} exact baselines.") + + +if __name__ == "__main__": + main() diff --git a/tools/empirical-bench/test_export.py b/tools/empirical-bench/test_export.py new file mode 100644 index 00000000..ab5389b5 --- /dev/null +++ b/tools/empirical-bench/test_export.py @@ -0,0 +1,51 @@ +"""Unit checks for measurement normalization, independent of running the benchmark.""" +import unittest + +from run import cpu_per_op, export + + +class NormalizationTests(unittest.TestCase): + def test_complete_comparison_rejects_missing_live_phase_measurements(self): + """An old constructor-only probe cannot label consuming-wrapper CPU as disjoint.""" + row = {"schema_version": 5, "query_accuracy": {}, "sketch": "cms", "impl": "lib", + "sketch_config": {}, "workload": {}} + manifest = {"invocations": [{}]} + for resources in [[], [dict(row, build_cpu_ns_samples=[1.0])]]: + with self.subTest(resources=resources): + with self.assertRaisesRegex(ValueError, "disjoint live-state"): + export([row], manifest, [[]], [], resources) + + def test_partial_report_files_are_rejected_before_pairing(self): + """A truncated report file must fail rather than silently lose invocations.""" + for raw, invocations, operations in [([{}], [], []), ([], [{}], []), ([], [], [{}])]: + with self.subTest(lengths=(len(raw), len(invocations), len(operations))): + with self.assertRaisesRegex(ValueError, "misaligned invocation reports"): + export(raw, {"invocations": invocations}, operations, []) + + def test_cpu_normalizes_paired_work_not_wall_time(self): + """Different wall durations for identical work must not change the denominator.""" + row = {"query_throughput_items_per_sec": {"samples": [2000, 1000]}, + "query_wall_time_ms": {"samples": [100, 200]}, + "query_cpu_time_ms": {"user_ms": {"samples": [20, 20]}, + "sys_ms": {"samples": [10, 10]}}} + result = cpu_per_op(row, "query") + self.assertEqual(result["value"], 150000) + self.assertEqual(result["stddev"], 0) + self.assertEqual(result["samples"], 2) + + def test_unmeasured_cpu_is_not_zero(self): + """Missing CPU evidence stays absent instead of looking like free work.""" + self.assertIsNone(cpu_per_op({}, "query")) + + def test_misaligned_samples_rejected(self): + """CPU and rates from different run populations cannot be paired.""" + row = {"insert_throughput_items_per_sec": {"samples": [2000, 1000]}, + "insert_wall_time_ms": {"samples": [100]}, + "insert_cpu_time_ms": {"user_ms": {"samples": [20, 20]}, + "sys_ms": {"samples": [10, 10]}}} + with self.assertRaises(ValueError): + cpu_per_op(row, "insert") + + +if __name__ == "__main__": + unittest.main() From bc7cf2a5c48f3bf34c3d69139d45370a9f23aafe Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:21:52 -0600 Subject: [PATCH 3/9] style(bench): format measurement provenance collection --- crates/devtools/src/bin/o11y_exact_bench.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/devtools/src/bin/o11y_exact_bench.rs b/crates/devtools/src/bin/o11y_exact_bench.rs index 890386b9..e0cd9bbd 100644 --- a/crates/devtools/src/bin/o11y_exact_bench.rs +++ b/crates/devtools/src/bin/o11y_exact_bench.rs @@ -277,10 +277,19 @@ fn main() -> Result<(), Box> { } let rows: Vec<_> = CORPUS.lines().map(str::trim).filter(|q|!q.is_empty()&&!q.starts_with('#')).map(|q| fixture(q).map_or_else(||json!({"query":q,"status":"unavailable","reason":"no complete reference kernel for this query; no borrowed costs"}), |f|run(&f,series,evaluations))).collect(); - let cpu = std::fs::read_to_string("/proc/cpuinfo").ok().and_then(|text| - text.lines().find(|line|line.starts_with("model name")).map(str::to_owned)); - let revision = std::process::Command::new("git").args(["rev-parse","HEAD"]).output().ok() - .filter(|out|out.status.success()).map(|out|String::from_utf8_lossy(&out.stdout).trim().to_owned()); + let cpu = std::fs::read_to_string("/proc/cpuinfo") + .ok() + .and_then(|text| { + text.lines() + .find(|line| line.starts_with("model name")) + .map(str::to_owned) + }); + let revision = std::process::Command::new("git") + .args(["rev-parse", "HEAD"]) + .output() + .ok() + .filter(|out| out.status.success()) + .map(|out| String::from_utf8_lossy(&out.stdout).trim().to_owned()); serde_json::to_writer_pretty( std::io::stdout(), &json!({"schema_version":1, From 74c4f6b98cedf97b5d6f1243eb6eb6d554d8495e Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:23:37 -0600 Subject: [PATCH 4/9] test(bench): record offline evidence and planner evaluation results --- .../results-sweep/MEASUREMENTS.md | 79 + .../results-sweep/comparison-evidence.json | 2494 + .../results-sweep/context-uniform.json | 23 + .../results-sweep/context-zipf.json | 23 + ...ontrol-plane-frequency-uniform-are001.json | 223 + ...ane-frequency-uniform-memory-weighted.json | 241 + .../control-plane-frequency-zipf-are001.json | 223 + ...-plane-frequency-zipf-memory-weighted.json | 241 + .../results-sweep/control-plane-uniform.json | 1536 + .../results-sweep/control-plane-zipf.json | 1536 + .../results-sweep/exact-baselines.json | 151 + .../results-sweep/manifest.json | 1598 + .../results-sweep/memory-probe.json | 1156 + .../results-sweep/operation-reports.json | 7444 ++ .../results-sweep/planner-evidence.json | 2194 + tools/empirical-bench/results-sweep/raw.json | 4608 + .../recommendation-uniform-are001.json | 428 + .../recommendation-uniform-are005.json | 428 + ...ecommendation-uniform-memory-weighted.json | 430 + .../recommendation-zipf-are001.json | 428 + .../recommendation-zipf-are005.json | 428 + .../recommendation-zipf-memory-weighted.json | 430 + .../results-sweep/request-uniform-are001.json | 55 + .../results-sweep/request-uniform-are005.json | 55 + .../request-uniform-memory-weighted.json | 65 + .../results-sweep/request-zipf-are001.json | 55 + .../results-sweep/request-zipf-are005.json | 55 + .../request-zipf-memory-weighted.json | 65 + .../results-sweep/resource-probe.json | 1564 + tools/empirical-bench/results/MEASUREMENTS.md | 59 + .../results/context-uniform.json | 23 + .../empirical-bench/results/context-zipf.json | 23 + .../results/control-plane-uniform.json | 1514 + .../results/control-plane-zipf.json | 1514 + .../results/exact-baselines.json | 113 + tools/empirical-bench/results/manifest.json | 490 + .../empirical-bench/results/memory-probe.json | 198 + .../results/o11y-exact-snapshot.json | 1888 + .../results/operation-reports.json | 2215 + .../results/planner-evidence.json | 433 + tools/empirical-bench/results/raw.json | 1367 + .../results/replay-uniform.json | 72556 ++++++++++++++++ .../empirical-bench/results/replay-zipf.json | 72550 +++++++++++++++ 43 files changed, 183199 insertions(+) create mode 100644 tools/empirical-bench/results-sweep/MEASUREMENTS.md create mode 100644 tools/empirical-bench/results-sweep/comparison-evidence.json create mode 100644 tools/empirical-bench/results-sweep/context-uniform.json create mode 100644 tools/empirical-bench/results-sweep/context-zipf.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-uniform.json create mode 100644 tools/empirical-bench/results-sweep/control-plane-zipf.json create mode 100644 tools/empirical-bench/results-sweep/exact-baselines.json create mode 100644 tools/empirical-bench/results-sweep/manifest.json create mode 100644 tools/empirical-bench/results-sweep/memory-probe.json create mode 100644 tools/empirical-bench/results-sweep/operation-reports.json create mode 100644 tools/empirical-bench/results-sweep/planner-evidence.json create mode 100644 tools/empirical-bench/results-sweep/raw.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-are001.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-are005.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-are001.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-are005.json create mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/request-uniform-are001.json create mode 100644 tools/empirical-bench/results-sweep/request-uniform-are005.json create mode 100644 tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/request-zipf-are001.json create mode 100644 tools/empirical-bench/results-sweep/request-zipf-are005.json create mode 100644 tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json create mode 100644 tools/empirical-bench/results-sweep/resource-probe.json create mode 100644 tools/empirical-bench/results/MEASUREMENTS.md create mode 100644 tools/empirical-bench/results/context-uniform.json create mode 100644 tools/empirical-bench/results/context-zipf.json create mode 100644 tools/empirical-bench/results/control-plane-uniform.json create mode 100644 tools/empirical-bench/results/control-plane-zipf.json create mode 100644 tools/empirical-bench/results/exact-baselines.json create mode 100644 tools/empirical-bench/results/manifest.json create mode 100644 tools/empirical-bench/results/memory-probe.json create mode 100644 tools/empirical-bench/results/o11y-exact-snapshot.json create mode 100644 tools/empirical-bench/results/operation-reports.json create mode 100644 tools/empirical-bench/results/planner-evidence.json create mode 100644 tools/empirical-bench/results/raw.json create mode 100644 tools/empirical-bench/results/replay-uniform.json create mode 100644 tools/empirical-bench/results/replay-zipf.json diff --git a/tools/empirical-bench/results-sweep/MEASUREMENTS.md b/tools/empirical-bench/results-sweep/MEASUREMENTS.md new file mode 100644 index 00000000..06400224 --- /dev/null +++ b/tools/empirical-bench/results-sweep/MEASUREMENTS.md @@ -0,0 +1,79 @@ +# Complete offline frequency component comparison + +Audience: planner developers reviewing empirical cost and accuracy decisions. + +This run measures 18 frequency sketch configurations and two exact references +using the actual pinned sketch-bench library stack. Uniform and Zipf inputs each +contain 20,000 i64 keys from a key-space of 1,000, seed 42; Zipf exponent is 1.1. +There are six CMS widths (272, 512, 2720, 4096, 27200, 32768), all at depth 5, +and three CountSketch widths (300, 3000, 30000), all at depth 83. Every timing +has five samples after two warmups. Offline accuracy is one fixed-input trial, +not a distribution-wide or realtime guarantee. + +Unlike the earlier `../results/` run, this comparison measures empty construction +and uses disjoint live-state CPU phases for both sketch and exact reference. +The companion calls the same library implementations directly: constructors +are outside update/read timing, state remains alive throughout each phase, and +destruction occurs after timing stops. Exact `prepare` uses the real upstream +`PolarsFrequencyCore::finalize` (Polars group-by/count plus HashMap). +The cost model ends with state retained after the reads; it does not include +retirement, persistence I/O CPU, interleaved updates, or merged-state accuracy. +No query-frequency break-even is claimed outside this fixed-snapshot workload. + +The six request files are explicit scenarios: 20,000 input keys, 1,000 lookups, +one retained state over 300 seconds, no merges. All-key average read cost and +mean absolute relative frequency error apply to precisely that probe population. +CPU-only requests impose 1% or 5% observed mean error. Memory-weighted requests +use the illustrative objective `CPU ns + 0.01 * retained byte-seconds`, a 1% +observed mean error threshold, and a formal CMS minimum of width 512/depth 5. +The weight is a caller preference, not a measured hardware exchange rate. + +| Distribution | CPU-only result (both error budgets) | Exact CPU estimate | Memory-weighted selected sketch | Sketch CPU estimate | CPU penalty for choosing sketch | +| --- | --- | ---: | --- | ---: | ---: | +| Uniform | Exact Polars + HashMap | 0.7033 ms | CMS width 2720, depth 5 | 0.7404 ms | +0.0371 ms | +| Zipf | Exact Polars + HashMap | 0.5446 ms | CMS width 2720, depth 5 | 0.7270 ms | +0.1824 ms | + +The memory-weighted choice saves retained state at the expense of CPU. It is +not a speedup. CMS width 2720 retains 54,400 requested heap bytes and has observed +mean relative errors 0.0063 / 0.0074. Smaller CMS width 512 has approximately +48.6% / 49.1% observed relative error, so it fails either strict error request. +CMS width 4096 has zero observed error on these two inputs, not a zero-error +guarantee. CountSketch's smaller rungs are offline alternatives; observed error +does not authorize using them below formal deployment sizes. + +Backend selection additionally filters to supported power-of-two CMS widths +before recommendation. Consequently the generic offline width-2720 recommendation +cannot be bound by rounding it after selection. The separate backend integration +report records the actual supported choice (or preserves exact execution). + +Snapshot size is now measured: CMS width 2720 serializes to 13,781 bytes on +Uniform and 13,933 bytes on Zipf; each flushed snapshot file occupies 16,384 +allocated filesystem bytes in this environment. The probe verifies deserialization +preserves all input-key estimates. Filesystem block allocation is separate from +logical serialization size and from requested heap bytes. Temporary snapshot +files are removed after measurement. These sizes do not imply any runtime write +schedule or measured disk-throughput benefit. + +The exact heap probe completed five clean lifecycles per distribution, with zero +allocation balance remaining after every state was destroyed. Exact retained +requested heap is 296,976 bytes on both distributions; construction/ingestion/ +prepare peak is 628,344 bytes on Uniform and 626,584 bytes on Zipf. These measured +values are used by the comparison instead of the older 290,816-byte footprint +formula. The selected CMS width-2720 state therefore saves 242,576 retained bytes +(81.68%) against this matched exact reference, while incurring the CPU penalties +shown above. + +The memory probe uses a separate counting System allocator; CPU measurements +use jemalloc without the counting shim. Heap figures mean requested allocation +bytes, not allocator-resident pages or process RSS. The upstream exact footprint +formula is retained separately in `exact-baselines.json` for auditability. +Raw timing/error reports, disjoint phase samples, heap samples, serialization +sizes, filesystem allocation, binary/source identities and full commands are +preserved alongside this document. Recommendations are generated by the Rust +planner comparator, not by a separate Python optimization model. + +This slice supplies no KLL/DDSketch quantile evidence and no real o11y trace +distribution. Fixed-quantile readout requires separately matched measurements; +point-frequency evidence must not be relabeled as `count_over_time` or quantile +accuracy. The separate synthetic o11y operator evaluation covers its explicitly +supported exact-summary workload. diff --git a/tools/empirical-bench/results-sweep/comparison-evidence.json b/tools/empirical-bench/results-sweep/comparison-evidence.json new file mode 100644 index 00000000..172c487c --- /dev/null +++ b/tools/empirical-bench/results-sweep/comparison-evidence.json @@ -0,0 +1,2494 @@ +{ + "schema_version": 1, + "timing_contract": "disjoint_live_state_v1", + "sketch_evidence": { + "schema_version": 1, + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "records": [ + { + "id": "cms-uniform-seed42-w272-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886308, + "valid_until_unix_seconds": 1791478308, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 505.475, + "stddev": 2.9324591056398384, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 39.18329, + "stddev": 1.2404534228458564, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1540.0, + "stddev": 49.21381919745713, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 41.56236, + "stddev": 1.2531359914231197, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 1669, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 1.6347221960194194, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w30000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886328, + "valid_until_unix_seconds": 1791478328, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5313752.5, + "stddev": 285040.9840468121, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 958.89495, + "stddev": 0.37400001336898875, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 900674.8, + "stddev": 6828.900035876935, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1381.6785599999998, + "stddev": 1.1267877186941877, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2490679, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 2498560, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w2720-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 2720, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886379, + "valid_until_unix_seconds": 1791478379, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 9061.88984375, + "stddev": 4977.459586428361, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 34.73418, + "stddev": 0.27307644442536533, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 2460.0, + "stddev": 107.4406813083387, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 36.6688, + "stddev": 0.01859623617832312, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 13781, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 16384, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.006335943223443224, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.104, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.104, + "accuracy_runs": 1, + "are_all": 0.006335943223443224, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.006335943223443223, + "l1_err": 104.0, + "l2_err": 40.049968789001575, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.006335943223443224, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w27200-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 27200, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886399, + "valid_until_unix_seconds": 1791478399, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 31745.793103448275, + "stddev": 915.6813529123244, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 46.32539, + "stddev": 0.22768290833964674, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 37594.2, + "stddev": 2734.4467813435317, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 50.47502, + "stddev": 0.05519897643978545, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 136183, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 143360, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w300-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 300, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886419, + "valid_until_unix_seconds": 1791478419, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 6091.32, + "stddev": 99.73249556626484, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 757.95226, + "stddev": 0.2581798365480518, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8584.4, + "stddev": 165.01908980478592, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 2104.83466, + "stddev": 1.6008204155995156, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 29755, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 32768, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.3932923866316825, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.446, + "aae_top1": 9.0, + "aae_top10": 8.2, + "aae_top100": 6.92, + "aae_top1000": 7.446, + "accuracy_runs": 1, + "are_all": 0.3932923866316825, + "are_top1": 0.2195121951219512, + "are_top10": 0.2434299417440008, + "are_top100": 0.2454991949546276, + "are_top1000": 0.3932923866316827, + "l1_err": 7446.0, + "l2_err": 312.3747749098829, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.3932923866316825, + "relative_error_p99": 1.3846153846153846 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w3000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 3000, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886440, + "valid_until_unix_seconds": 1791478440, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 51035.7375, + "stddev": 951.9281311091058, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 774.44066, + "stddev": 0.6066855995901015, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 68290.8, + "stddev": 247.88848299184858, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1519.04208, + "stddev": 7.1756951556626465, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 251754, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 258048, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w272-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886460, + "valid_until_unix_seconds": 1791478460, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 413.40859375, + "stddev": 2.7002030472877463, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.40953, + "stddev": 0.1888592286598663, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1104.6, + "stddev": 114.85773809369572, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 35.77964285714286, + "stddev": 0.26766073908351545, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 1722, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 2.3164860214890104, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w30000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886480, + "valid_until_unix_seconds": 1791478480, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 4991299.4, + "stddev": 127408.84023557784, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 862.07043, + "stddev": 67.54045694576882, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 906510.0, + "stddev": 10240.438638066242, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1383.6344117647059, + "stddev": 2.9386960922807495, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2495217, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 2502656, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w2720-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 2720, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886531, + "valid_until_unix_seconds": 1791478531, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 13362.875, + "stddev": 3039.657607879287, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.83039, + "stddev": 0.16780548039322382, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 2661.8, + "stddev": 223.53120587515292, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 37.005063025210085, + "stddev": 0.16744114940021262, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 13933, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 16384, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.007412989350329503, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.015756302521008403, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.05, + "accuracy_runs": 1, + "are_all": 0.007412989350329503, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0008494363929146537, + "l1_err": 15.0, + "l2_err": 6.557438524302, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.007412989350329503, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w27200-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 27200, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886551, + "valid_until_unix_seconds": 1791478551, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 29308.56551724138, + "stddev": 325.16572706768056, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 37.90535, + "stddev": 0.20893840898695612, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 33239.0, + "stddev": 1520.0851949808603, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 42.75764705882353, + "stddev": 0.029966574634030334, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 136338, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 143360, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w300-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 300, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886571, + "valid_until_unix_seconds": 1791478571, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5789.295, + "stddev": 50.43642858217649, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 756.83812, + "stddev": 0.15442492755380408, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8532.4, + "stddev": 65.54998093058457, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 2100.1955042016807, + "stddev": 4.949446360451842, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 29853, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 32768, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.6369033391351014, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 2.2815126050420167, + "aae_top1": 1.0, + "aae_top10": 0.8, + "aae_top100": 2.01, + "accuracy_runs": 1, + "are_all": 0.6369033391351014, + "are_top1": 0.0002805836139169473, + "are_top10": 0.001555601294898813, + "are_top100": 0.04553785988253641, + "l1_err": 2172.0, + "l2_err": 102.52804494381036, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.6369033391351014, + "relative_error_p99": 4.5 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w3000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 3000, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886592, + "valid_until_unix_seconds": 1791478592, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 51510.1875, + "stddev": 1338.8413243535902, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 763.80445, + "stddev": 1.0832422484144655, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 68282.4, + "stddev": 462.2210510134734, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1500.9115756302522, + "stddev": 13.696449994980448, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 254181, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 262144, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w512-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886649, + "valid_until_unix_seconds": 1791478649, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 653.75078125, + "stddev": 14.656944769230105, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.62379, + "stddev": 0.07565315095883289, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1184.0, + "stddev": 10.770329614269007, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 35.6547, + "stddev": 0.008609006911371453, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2759, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.4857875000848293, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 9.229, + "aae_top1": 0.0, + "aae_top10": 5.7, + "aae_top100": 9.32, + "aae_top1000": 9.229, + "accuracy_runs": 1, + "are_all": 0.4857875000848293, + "are_top1": 0.0, + "are_top10": 0.17943548387096775, + "are_top100": 0.3330711319229116, + "are_top1000": 0.485787500084829, + "l1_err": 9229.0, + "l2_err": 467.7210707248499, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.4857875000848293, + "relative_error_p99": 2.3684210526315788 + } + } + } + }, + { + "id": "cms-uniform-seed42-w4096-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 4096, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886669, + "valid_until_unix_seconds": 1791478669, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 4973.88, + "stddev": 300.623465532763, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 35.00645, + "stddev": 0.3773887451951894, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 5853.0, + "stddev": 1073.9336571688216, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 37.45286, + "stddev": 0.01899928946039723, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 20661, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 24576, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w32768-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 32768, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886689, + "valid_until_unix_seconds": 1791478689, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 35327.308333333334, + "stddev": 703.0214501528393, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 42.568979999999996, + "stddev": 0.47701038982395344, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 42699.4, + "stddev": 3601.5573437056364, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 46.04674, + "stddev": 0.23154995789245925, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 164023, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 172032, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w512-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886709, + "valid_until_unix_seconds": 1791478709, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 739.0640625, + "stddev": 3.194833256007488, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 40.60954, + "stddev": 0.08235665121895089, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1845.0, + "stddev": 327.10854467592253, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 43.60256302521008, + "stddev": 0.023270849185024416, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2913, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.49153700428012315, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 1.694327731092437, + "aae_top1": 2.0, + "aae_top10": 1.8, + "aae_top100": 1.46, + "accuracy_runs": 1, + "are_all": 0.49153700428012315, + "are_top1": 0.0005611672278338945, + "are_top10": 0.003950663328809479, + "are_top100": 0.03129160657746158, + "l1_err": 1613.0, + "l2_err": 107.81001808737442, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.49153700428012315, + "relative_error_p99": 5.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w4096-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 4096, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886729, + "valid_until_unix_seconds": 1791478729, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5492.366153846154, + "stddev": 110.32925778298996, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 46.86758, + "stddev": 0.2167893926141219, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8647.0, + "stddev": 13.30413469565007, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 51.65478991596639, + "stddev": 0.3125781503156082, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 20818, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 24576, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w32768-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 32768, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886750, + "valid_until_unix_seconds": 1791478750, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 37349.625, + "stddev": 337.66657026364135, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 48.96084, + "stddev": 0.2723536519857951, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 48184.4, + "stddev": 857.3592012686398, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 55.503865546218485, + "stddev": 0.030379887382542214, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 164178, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 172032, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + } + ] + }, + "query_bindings": [ + { + "record_id": "cms-uniform-seed42-w272-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-uniform-seed42-w30000-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-uniform-seed42-w2720-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-uniform-seed42-w27200-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-uniform-seed42-w300-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-uniform-seed42-w3000-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w272-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-zipf-seed42-w30000-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w2720-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w27200-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-zipf-seed42-w300-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "countsketch-zipf-seed42-w3000-d83", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-uniform-seed42-w512-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-uniform-seed42-w4096-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-uniform-seed42-w32768-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w512-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w4096-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + }, + { + "record_id": "cms-zipf-seed42-w32768-d5", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + } + } + ], + "exact_records": [ + { + "id": "exact-uniform-seed42-w272-d5", + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "measured_at_unix_seconds": 1788886308, + "valid_until_unix_seconds": 1791478308, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms --library polars --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "empty_build_cpu_ns": { + "value": 8.846435546875, + "stddev": 0.013714315753574624, + "samples": 5, + "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" + }, + "update_cpu_ns": { + "value": 2.31019, + "stddev": 0.07922044717116923, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "prepare_cpu_ns": { + "value": 640826.2, + "stddev": 7605.786856072158, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 16.237379999999998, + "stddev": 0.10556577096767712, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 296976, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + }, + "peak_bytes": { + "value": 628344, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + } + } + }, + { + "id": "exact-zipf-seed42-w272-d5", + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "measured_at_unix_seconds": 1788886460, + "valid_until_unix_seconds": 1791478460, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms --library polars --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "empty_build_cpu_ns": { + "value": 8.84130859375, + "stddev": 0.014463142841002207, + "samples": 5, + "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" + }, + "update_cpu_ns": { + "value": 2.16378, + "stddev": 0.02405147084899392, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "prepare_cpu_ns": { + "value": 484917.8, + "stddev": 9739.177208573628, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 16.352710084033614, + "stddev": 0.1020372063260519, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 296976, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + }, + "peak_bytes": { + "value": 626584, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + } + } + } + ] +} diff --git a/tools/empirical-bench/results-sweep/context-uniform.json b/tools/empirical-bench/results-sweep/context-uniform.json new file mode 100644 index 00000000..a6c0b3c2 --- /dev/null +++ b/tools/empirical-bench/results-sweep/context-uniform.json @@ -0,0 +1,23 @@ +{ + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 +} diff --git a/tools/empirical-bench/results-sweep/context-zipf.json b/tools/empirical-bench/results-sweep/context-zipf.json new file mode 100644 index 00000000..d04daa2e --- /dev/null +++ b/tools/empirical-bench/results-sweep/context-zipf.json @@ -0,0 +1,23 @@ +{ + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 +} diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json new file mode 100644 index 00000000..73cfdf89 --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json @@ -0,0 +1,223 @@ +{ + "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Extension {\n ext_kind: \"frequency\",\n payload: Object {\n \"accuracy\": Object {\n \"Epsilon\": Number(0.01),\n },\n \"item_label\": String(\"key\"),\n \"item_value\": String(\"42\"),\n },\n },\n ],\n output_names: [],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n ),\n)", + "formal_epsilon": 0.01, + "item": 42, + "limitations": [ + "The caller asserts the fixed-snapshot integer-key benchmark context", + "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", + "No materializations deployed or data-plane execution performed" + ], + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 742555.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 932753.6483333334, + "disk_bytes_per_state": 172032.0, + "objective_cost": 932753.6483333334, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164023.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "root_raw_fallback": true, + "scope": "typed offline point-frequency recommendation and control-plane binding", + "unavailable_reason": null +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json new file mode 100644 index 00000000..ae474e20 --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json @@ -0,0 +1,241 @@ +{ + "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: SummaryEstimate {\n summary_input: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n },\n query: PointCount {\n key: Named(\n \"key\",\n ),\n value: Some(\n \"42\",\n ),\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: Frequency,\n bound: Constant {\n value: 0.0006636430245261341,\n },\n failure_probability: Constant {\n value: 0.006737946999085467,\n },\n provenance: [\n SketchReadout {\n algorithm: \"Cms\",\n contract: \"count_min_l1_markov_v1\",\n params: Object {\n \"Cms\": Object {\n \"depth\": Number(5),\n \"width\": Number(4096),\n },\n },\n query: \"PointCount { key: Named(\\\"key\\\"), value: Some(\\\"42\\\") }\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ApproximateAggregate,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n ),\n)", + "formal_epsilon": 0.01, + "item": 42, + "limitations": [ + "The caller asserts the fixed-snapshot integer-key benchmark context", + "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", + "No materializations deployed or data-plane execution performed" + ], + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 988315.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 932753.6483333334, + "disk_bytes_per_state": 172032.0, + "objective_cost": 2898833.6483333334, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164023.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": -39279.51356445311, + "estimated_retained_bytes_savings": 215056.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 1594204.2264355468, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 988315.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + } + ], + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "root_raw_fallback": false, + "scope": "typed offline point-frequency recommendation and control-plane binding", + "unavailable_reason": null +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json new file mode 100644 index 00000000..ab6cca7b --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json @@ -0,0 +1,223 @@ +{ + "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Extension {\n ext_kind: \"frequency\",\n payload: Object {\n \"accuracy\": Object {\n \"Epsilon\": Number(0.01),\n },\n \"item_label\": String(\"key\"),\n \"item_value\": String(\"42\"),\n },\n },\n ],\n output_names: [],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n ),\n)", + "formal_epsilon": 0.01, + "item": 42, + "limitations": [ + "The caller asserts the fixed-snapshot integer-key benchmark context", + "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", + "No materializations deployed or data-plane execution performed" + ], + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 994498.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 1072070.2905462184, + "disk_bytes_per_state": 172032.0, + "objective_cost": 1072070.2905462184, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164178.0 + } + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "root_raw_fallback": true, + "scope": "typed offline point-frequency recommendation and control-plane binding", + "unavailable_reason": null +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json new file mode 100644 index 00000000..e3da71f4 --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json @@ -0,0 +1,241 @@ +{ + "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: SummaryEstimate {\n summary_input: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n },\n query: PointCount {\n key: Named(\n \"key\",\n ),\n value: Some(\n \"42\",\n ),\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: Frequency,\n bound: Constant {\n value: 0.0006636430245261341,\n },\n failure_probability: Constant {\n value: 0.006737946999085467,\n },\n provenance: [\n SketchReadout {\n algorithm: \"Cms\",\n contract: \"count_min_l1_markov_v1\",\n params: Object {\n \"Cms\": Object {\n \"depth\": Number(5),\n \"width\": Number(4096),\n },\n },\n query: \"PointCount { key: Named(\\\"key\\\"), value: Some(\\\"42\\\") }\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ApproximateAggregate,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n ),\n)", + "formal_epsilon": 0.01, + "item": 42, + "limitations": [ + "The caller asserts the fixed-snapshot integer-key benchmark context", + "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", + "No materializations deployed or data-plane execution performed" + ], + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 1240258.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 1072070.2905462184, + "disk_bytes_per_state": 172032.0, + "objective_cost": 3038150.2905462184, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164178.0 + } + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": -449943.804677185, + "estimated_retained_bytes_savings": 215056.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 1435482.9513926273, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 1240258.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + } + ], + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "root_raw_fallback": false, + "scope": "typed offline point-frequency recommendation and control-plane binding", + "unavailable_reason": null +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-uniform.json b/tools/empirical-bench/results-sweep/control-plane-uniform.json new file mode 100644 index 00000000..c3e7f1cc --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-uniform.json @@ -0,0 +1,1536 @@ +{ + "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "estimated_end_to_end_savings": null, + "evaluation": "offline control-plane parser and typed summary binder", + "limitations": [ + "No deployed execution or measured end-to-end speedup", + "Binding does not establish executable placement or complete physical cost", + "Offline point-frequency errors do not establish current query guarantees", + "raw_subtrees includes necessary source scans beneath summaries" + ], + "offline_context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "rows": [ + { + "mode": "exact", + "planning_elapsed_ns": 23488917, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 5626616, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 5119687, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 13654076, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9961464, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3927451, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3608500, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3603072, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3603403, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7601402, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3654507, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 2956095, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7706557, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 16987813, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7710442, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7690766, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 15061807, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9330438, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9552102, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3522606, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3734993, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3685464, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 4273156, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10126022, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10721623, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3656938, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3505275, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10716402, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3814882, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3810214, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 11117536, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9225309, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3891739, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3616177, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3585811, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3594239, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7610806, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3650866, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3071899, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7689742, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 16988686, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7720601, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7672916, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 15070153, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9235865, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9594067, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3522046, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3734095, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3683268, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 4279327, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10072650, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10729961, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3653979, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3494081, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10864653, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3816141, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3810222, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 11266686, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9221447, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3892051, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3609406, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3604180, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3600843, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7607819, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3654440, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3067066, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7686698, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 16988097, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7690207, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7687079, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 15069883, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9199423, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9542765, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3525941, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3734957, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3683890, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 4272091, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10105015, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10922153, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3662076, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3503888, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + } + ], + "schema_version": 1, + "reproduction": { + "command": [ + "cargo", + "run", + "--quiet", + "-p", + "control_plane", + "--example", + "offline_planner_replay", + "--", + "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/planner-evidence.json", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/context-uniform.json" + ], + "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", + "planner_revision": "dfdf6b5c1f7d667394a4ea1f56fb3786af04228d", + "backend_dirty": true, + "planner_dirty": false, + "planner_source": "pinned_git_dependency" + } +} diff --git a/tools/empirical-bench/results-sweep/control-plane-zipf.json b/tools/empirical-bench/results-sweep/control-plane-zipf.json new file mode 100644 index 00000000..231e555c --- /dev/null +++ b/tools/empirical-bench/results-sweep/control-plane-zipf.json @@ -0,0 +1,1536 @@ +{ + "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "estimated_end_to_end_savings": null, + "evaluation": "offline control-plane parser and typed summary binder", + "limitations": [ + "No deployed execution or measured end-to-end speedup", + "Binding does not establish executable placement or complete physical cost", + "Offline point-frequency errors do not establish current query guarantees", + "raw_subtrees includes necessary source scans beneath summaries" + ], + "offline_context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "rows": [ + { + "mode": "exact", + "planning_elapsed_ns": 12832552, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3866233, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3804280, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 11307005, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9744835, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3918827, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3601556, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3592663, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3596104, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7589547, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3648815, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3483616, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7672914, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 16963534, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7706072, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7660732, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 15059179, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9644568, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9559658, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3518503, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3730665, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3688405, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 4268132, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10516766, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10719205, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3650911, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3498275, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10811485, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3813822, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3806139, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 11112933, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9577242, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3887106, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3609492, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3598309, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3594972, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7606504, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3650504, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3481678, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7681928, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 17017942, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7752312, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7671696, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 15081671, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9669562, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9577064, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3516380, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3731446, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3683710, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 4277400, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10561375, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10938389, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3648653, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3496754, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10928917, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3811033, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3804938, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 11250554, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9552127, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3885379, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3604017, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3591444, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3597560, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7604627, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3649075, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3483081, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7669062, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 16976947, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7722286, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7672621, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 15050049, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9654149, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9543023, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3519336, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3729783, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3680998, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 4277677, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10541307, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10730686, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3654212, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3499937, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + } + ], + "schema_version": 1, + "reproduction": { + "command": [ + "cargo", + "run", + "--quiet", + "-p", + "control_plane", + "--example", + "offline_planner_replay", + "--", + "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/planner-evidence.json", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/context-zipf.json" + ], + "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", + "planner_revision": "dfdf6b5c1f7d667394a4ea1f56fb3786af04228d", + "backend_dirty": true, + "planner_dirty": false, + "planner_source": "pinned_git_dependency" + } +} diff --git a/tools/empirical-bench/results-sweep/exact-baselines.json b/tools/empirical-bench/results-sweep/exact-baselines.json new file mode 100644 index 00000000..7b0fbdaa --- /dev/null +++ b/tools/empirical-bench/results-sweep/exact-baselines.json @@ -0,0 +1,151 @@ +[ + { + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "implementation": "polars exact group_by + HashMap", + "insert_cpu_ns_per_item": { + "value": 2.31019, + "stddev": 0.07922044717116923, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "prepare_cpu_ns_per_dataset": { + "value": 640826.2, + "stddev": 7605.786856072158, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns_per_key": { + "value": 16.237379999999998, + "stddev": 0.10556577096767712, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": 290816, + "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "empty_build_cpu_ns": { + "value": 8.846435546875, + "stddev": 0.013714315753574624, + "samples": 5, + "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" + }, + "retained_heap_bytes": { + "value": 296976, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + }, + "peak_heap_bytes": { + "value": 628344, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + } + }, + { + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "implementation": "polars exact group_by + HashMap", + "insert_cpu_ns_per_item": { + "value": 2.16378, + "stddev": 0.02405147084899392, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "prepare_cpu_ns_per_dataset": { + "value": 484917.8, + "stddev": 9739.177208573628, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns_per_key": { + "value": 16.352710084033614, + "stddev": 0.1020372063260519, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": 290816, + "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "empty_build_cpu_ns": { + "value": 8.84130859375, + "stddev": 0.014463142841002207, + "samples": 5, + "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" + }, + "retained_heap_bytes": { + "value": 296976, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + }, + "peak_heap_bytes": { + "value": 626584, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" + } + } +] diff --git a/tools/empirical-bench/results-sweep/manifest.json b/tools/empirical-bench/results-sweep/manifest.json new file mode 100644 index 00000000..7c46111e --- /dev/null +++ b/tools/empirical-bench/results-sweep/manifest.json @@ -0,0 +1,1598 @@ +{ + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "source_dirty": false, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2" + }, + "binary_sha256": "1c2aebd6649ecf9dd2a77dbc6c6c4bd89d07c061f387389e12698dfe41dbc6d4", + "runtime_provenance": { + "runtime_field_status": "declared build preconditions, not introspected from the executable", + "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", + "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", + "declared_settings": "release; repository target-cpu=native; default jemalloc", + "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", + "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings" + }, + "invocations": [ + { + "id": "cms-uniform-seed42-w272-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "countsketch-uniform-seed42-w30000-d83", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "exact-uniform-seed42-w272-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Exact", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "prepare", + "--metrics", + "latency,cpu,memory" + ] + }, + { + "id": "cms-uniform-seed42-w2720-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=2720", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=2720", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "cms-uniform-seed42-w27200-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=27200", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=27200", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "countsketch-uniform-seed42-w300-d83", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=300", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=300", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "countsketch-uniform-seed42-w3000-d83", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=3000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=3000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "cms-zipf-seed42-w272-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "countsketch-zipf-seed42-w30000-d83", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "exact-zipf-seed42-w272-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Exact", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "prepare", + "--metrics", + "latency,cpu,memory", + "--zipf-s", + "1.1" + ] + }, + { + "id": "cms-zipf-seed42-w2720-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=2720", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=2720", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "cms-zipf-seed42-w27200-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=27200", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=27200", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "countsketch-zipf-seed42-w300-d83", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=300", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=300", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "countsketch-zipf-seed42-w3000-d83", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=3000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=3000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "cms-uniform-seed42-w512-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=512", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=512", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "cms-uniform-seed42-w4096-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=4096", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=4096", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "cms-uniform-seed42-w32768-d5", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=32768", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=32768", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": null + }, + { + "id": "cms-zipf-seed42-w512-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=512", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=512", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "cms-zipf-seed42-w4096-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=4096", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=4096", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "cms-zipf-seed42-w32768-d5", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=32768", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=32768", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + } + ], + "memory_probe": { + "source_sha256": "e00d06d0fa8cba91a2002ab6907abc299f958f15b604af25fedbff40f1f5ffcd", + "compile_argv": [ + "rustc", + "--edition=2021", + "-C", + "opt-level=3", + "-C", + "panic=abort", + "-C", + "target-cpu=native", + "-L", + "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/memory_probe.rs", + "-o", + "/tmp/asap-memory-probe-n9uar0jf/memory-probe", + "--extern", + "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", + "--extern", + "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", + "--extern", + "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib", + "--extern", + "sketch_bench=/mydata/sketch-bench-empirical-322/target/release/deps/libsketch_bench-a5253016ef6c3464.rlib", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/parking_lot_core-c5a5e0d71b53c3f9/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-schema-0a856eee7186aef8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-core-0dd86b8db3572fa4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/getrandom-50d1f8431ac559e7/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/thiserror-1af01011b7c1080b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-compute-206799857e5f2242/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/object-4bc422477f333c3b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/num-traits-12456a3612313957/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-utils-089d0beadf99033c/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-2ea15a1ac3ee4c0d/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/psm-219a73c4a64cba21/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-arrow-e4ca671fd2bb5451/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-b2ef154e74e26c09/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-lazy-d1ffe2cd6989855b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-ops-98e6fab6568754e8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zmij-2d2f27c0673cdf2a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/proc-macro2-cea40e985b7590c0/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-21aee85e18bd062a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-safe-f63c98332f917517/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_json-e116251e9e55490e/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/crossbeam-utils-18696716158d2402/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/stacker-b2d7e69958718f3f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/crc32fast-ebefb9f7c0915fb4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/quote-95ad9003c7cac562/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zerocopy-7931ceb31f5dc13c/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/paste-ad7af34da7803563/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libm-b1ff914daded363a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/ahash-631aa817ee56071f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/lz4-sys-99def065bc264315/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rustix-2e359f4caddb674f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde-7b6b458485157d73/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-48289a87b282dc48/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rayon-core-b1557f267348d6c4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-plan-49fb2c4cd5ea3f48/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rustversion-2053b8c49ec6187a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/chrono-tz-19fe2621cdb8a5f8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-52f449270a8194c9/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_core-d525236e05349557/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-sys-8b42f68034627dbe/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out/lib" + ], + "allocator": "System + requested-byte tracking; separate from uninstrumented jemalloc CPU measurements" + }, + "resource_probe": { + "source_sha256": "a9cd9fd257022620fd718e0f34487ba6001469f0f2fba6170ab73ec731e05336", + "compile_argv": [ + "rustc", + "--edition=2021", + "-C", + "opt-level=3", + "-C", + "panic=abort", + "-C", + "target-cpu=native", + "-L", + "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/resource_probe.rs", + "-o", + "/tmp/asap-resource-probe-4xcwpp9f/resource-probe", + "--extern", + "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", + "--extern", + "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", + "--extern", + "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib", + "--extern", + "tikv_jemallocator=/mydata/sketch-bench-empirical-322/target/release/deps/libtikv_jemallocator-f788f1bc48fa8f69.rlib", + "--extern", + "sketch_bench=/mydata/sketch-bench-empirical-322/target/release/deps/libsketch_bench-a5253016ef6c3464.rlib", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out/lib", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/parking_lot_core-c5a5e0d71b53c3f9/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-schema-0a856eee7186aef8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-core-0dd86b8db3572fa4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/getrandom-50d1f8431ac559e7/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/thiserror-1af01011b7c1080b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-compute-206799857e5f2242/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/object-4bc422477f333c3b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/num-traits-12456a3612313957/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-utils-089d0beadf99033c/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-2ea15a1ac3ee4c0d/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/psm-219a73c4a64cba21/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-arrow-e4ca671fd2bb5451/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-b2ef154e74e26c09/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-lazy-d1ffe2cd6989855b/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-ops-98e6fab6568754e8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zmij-2d2f27c0673cdf2a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/proc-macro2-cea40e985b7590c0/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-21aee85e18bd062a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-safe-f63c98332f917517/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_json-e116251e9e55490e/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/crossbeam-utils-18696716158d2402/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/stacker-b2d7e69958718f3f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/crc32fast-ebefb9f7c0915fb4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/quote-95ad9003c7cac562/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zerocopy-7931ceb31f5dc13c/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/paste-ad7af34da7803563/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libm-b1ff914daded363a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/ahash-631aa817ee56071f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/lz4-sys-99def065bc264315/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rustix-2e359f4caddb674f/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde-7b6b458485157d73/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-48289a87b282dc48/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rayon-core-b1557f267348d6c4/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-plan-49fb2c4cd5ea3f48/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/rustversion-2053b8c49ec6187a/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/chrono-tz-19fe2621cdb8a5f8/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-52f449270a8194c9/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_core-d525236e05349557/out", + "-L", + "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-sys-8b42f68034627dbe/out" + ], + "allocator": "jemalloc", + "disk_filesystem_path": "/tmp" + } +} diff --git a/tools/empirical-bench/results-sweep/memory-probe.json b/tools/empirical-bench/results-sweep/memory-probe.json new file mode 100644 index 00000000..183b3422 --- /dev/null +++ b/tools/empirical-bench/results-sweep/memory-probe.json @@ -0,0 +1,1156 @@ +[ + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "cleanup_deltas": [ + 0, + 0, + 0, + 0, + 0 + ], + "impl": "polars", + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages", + "samples": [ + [ + 296976, + 628344 + ], + [ + 296976, + 628344 + ], + [ + 296976, + 628344 + ], + [ + 296976, + 628344 + ], + [ + 296976, + 628344 + ] + ], + "sketch": "cms", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "cleanup_deltas": [ + 0, + 0, + 0, + 0, + 0 + ], + "impl": "polars", + "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages", + "samples": [ + [ + 296976, + 626584 + ], + [ + 296976, + 626584 + ], + [ + 296976, + 626584 + ], + [ + 296976, + 626584 + ], + [ + 296976, + 626584 + ] + ], + "sketch": "cms", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ], + [ + 54400, + 54400 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ], + [ + 544000, + 544000 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ], + [ + 99600, + 99600 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ], + [ + 996000, + 996000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ], + [ + 10240, + 10240 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ], + [ + 81920, + 81920 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "impl": "lib", + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ], + [ + 655360, + 655360 + ] + ], + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + } +] diff --git a/tools/empirical-bench/results-sweep/operation-reports.json b/tools/empirical-bench/results-sweep/operation-reports.json new file mode 100644 index 00000000..dc646821 --- /dev/null +++ b/tools/empirical-bench/results-sweep/operation-reports.json @@ -0,0 +1,7444 @@ +[ + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 28590919.77709379, + "stddev": 1609158.8508598115, + "n": 5, + "samples": [ + 31412115.96724973, + 27333606.66940003, + 28108718.902972918, + 28045141.459693525, + 28055015.886152744 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7024, + "stddev": 0.03748066168039188, + "n": 5, + "samples": [ + 0.637, + 0.733, + 0.713, + 0.715, + 0.714 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.00044721359549995795, + "n": 5, + "samples": [ + 0.0, + 0.001, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7011882, + "stddev": 0.03700154713927518, + "n": 5, + "samples": [ + 0.636697, + 0.7317, + 0.711523, + 0.713136, + 0.712885 + ] + }, + "rss_peak_kb": 11296, + "heap_allocated_kb": 1051, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:51:48.103893862Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 24473073.58858718, + "stddev": 169053.16090350362, + "n": 5, + "samples": [ + 24592381.28027937, + 24225979.94088861, + 24376569.241644934, + 24537468.714727387, + 24632968.765395604 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.042800000000000005, + "stddev": 0.0017888543819998294, + "n": 5, + "samples": [ + 0.042, + 0.042, + 0.042, + 0.042, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0408628, + "stddev": 0.0002832820149603565, + "n": 5, + "samples": [ + 0.040663, + 0.041278, + 0.041023, + 0.040754, + 0.040596 + ] + }, + "rss_peak_kb": 11296, + "heap_allocated_kb": 733, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:51:48.103896498Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0034000000000000002, + "stddev": 0.0008944271909999159, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0022308, + "stddev": 0.0009705532958060571, + "n": 5, + "samples": [ + 0.003907, + 0.002138, + 0.001958, + 0.001485, + 0.001666 + ] + }, + "rss_peak_kb": 11296, + "heap_allocated_kb": 637, + "memory_bytes": 5440, + "merge_folds_per_sec": { + "mean": 501608.7408443724, + "stddev": 158760.43356765856, + "n": 5, + "samples": [ + 255950.8574353724, + 467726.8475210477, + 510725.2298263534, + 673400.6734006734, + 600240.0960384153 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:51:48.103904851Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.036862, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.036862 + ] + }, + "memory_bytes": 5440, + "accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.0794538568545333, + "are_top1000": 1.6347221960194203, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:51:58.116123539Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 921478.5810593877, + "stddev": 7690.019883726106, + "n": 5, + "samples": [ + 929058.0559088557, + 913257.1049804568, + 928536.7908329278, + 913737.1378362878, + 922803.8157384098 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 20.1178, + "stddev": 2.2658516500424297, + "n": 5, + "samples": [ + 17.571, + 21.876, + 21.541, + 21.89, + 17.711 + ] + }, + "sys_ms": { + "mean": 1.5894, + "stddev": 2.164989792123741, + "n": 5, + "samples": [ + 3.958, + 0.025, + 0.0, + 0.0, + 3.964 + ] + } + }, + "wall_time_ms": { + "mean": 21.705458999999998, + "stddev": 0.1813336608258377, + "n": 5, + "samples": [ + 21.52718, + 21.899638, + 21.539265, + 21.888133, + 21.673079 + ] + }, + "rss_peak_kb": 282556, + "heap_allocated_kb": 243573, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:08.791194355Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 268207.4355130188, + "stddev": 12903.457164889896, + "n": 5, + "samples": [ + 281195.15815681074, + 256320.15001905742, + 278226.9597472364, + 252803.9113821169, + 272490.9982598725 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 3.6565999999999996, + "stddev": 0.3205811909641613, + "n": 5, + "samples": [ + 3.151, + 3.904, + 3.596, + 3.957, + 3.675 + ] + }, + "sys_ms": { + "mean": 0.0814, + "stddev": 0.18201593336848287, + "n": 5, + "samples": [ + 0.407, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 3.7354578000000003, + "stddev": 0.18192240655207922, + "n": 5, + "samples": [ + 3.556249, + 3.901371, + 3.594188, + 3.955635, + 3.669846 + ] + }, + "rss_peak_kb": 282556, + "heap_allocated_kb": 175245, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:08.791198645Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 1.596, + "stddev": 1.5730268592748184, + "n": 5, + "samples": [ + 0.0, + 0.0, + 1.694, + 3.083, + 3.203 + ] + }, + "sys_ms": { + "mean": 1.5617999999999999, + "stddev": 1.5978310924500123, + "n": 5, + "samples": [ + 3.274, + 3.106, + 1.429, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 3.1563134, + "stddev": 0.07895276971899076, + "n": 5, + "samples": [ + 3.272052, + 3.104857, + 3.121441, + 3.081432, + 3.201785 + ] + }, + "rss_peak_kb": 282556, + "heap_allocated_kb": 77909, + "memory_bytes": 9960000, + "merge_folds_per_sec": { + "mean": 316.98194388143827, + "stddev": 7.827645548918142, + "n": 5, + "samples": [ + 305.61861486308896, + 322.0760247573399, + 320.3648571284865, + 324.5244418828649, + 312.3257807754112 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:08.791206619Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 8.759675, + "stddev": 0.0, + "n": 1, + "samples": [ + 8.759675 + ] + }, + "memory_bytes": 9960000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:18.902251139Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 571845728.2743416, + "stddev": 78709030.93591695, + "n": 5, + "samples": [ + 671817265.7037286, + 451803826.7784128, + 568084985.5138328, + 590005310.0477904, + 577517253.3279432 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0366, + "stddev": 0.0051283525619832335, + "n": 5, + "samples": [ + 0.031, + 0.045, + 0.036, + 0.035, + 0.036 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0355544, + "stddev": 0.005317104315320511, + "n": 5, + "samples": [ + 0.02977, + 0.044267, + 0.035206, + 0.033898, + 0.034631 + ] + }, + "rss_peak_kb": 19476, + "heap_allocated_kb": 3185, + "memory_bytes": 262144 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:28.929676697Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 19775757.807094183, + "stddev": 838476.1546876673, + "n": 5, + "samples": [ + 19481784.531463083, + 20583331.618055698, + 18481555.407703113, + 20382788.773159944, + 19949328.705089074 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0526, + "stddev": 0.0023021728866442675, + "n": 5, + "samples": [ + 0.053, + 0.05, + 0.056, + 0.051, + 0.053 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0506418, + "stddev": 0.0022074174276742508, + "n": 5, + "samples": [ + 0.05133, + 0.048583, + 0.054108, + 0.049061, + 0.050127 + ] + }, + "rss_peak_kb": 19492, + "heap_allocated_kb": 2053, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:28.929684580Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.048841, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.048841 + ] + }, + "memory_bytes": 290816, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:38.943261347Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "latency", + "operation": "prepare", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.862, + "stddev": 0.01598436736314578, + "n": 5, + "samples": [ + 0.842, + 0.863, + 0.872, + 0.851, + 0.882 + ] + } + }, + "wall_time_ms": { + "mean": 0.8168664, + "stddev": 0.009893839158789667, + "n": 5, + "samples": [ + 0.802512, + 0.822305, + 0.821603, + 0.811058, + 0.826854 + ] + }, + "rss_peak_kb": 18288, + "heap_allocated_kb": 1834, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:48.962964572Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 24990558.513269562, + "stddev": 1579868.8793788734, + "n": 5, + "samples": [ + 27797854.005670764, + 24403338.376689933, + 24401790.115322858, + 23973686.48171767, + 24376123.586946588 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.8038, + "stddev": 0.04668725736215394, + "n": 5, + "samples": [ + 0.721, + 0.82, + 0.821, + 0.835, + 0.822 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.8026749999999999, + "stddev": 0.04692298889670179, + "n": 5, + "samples": [ + 0.71948, + 0.81956, + 0.819612, + 0.834248, + 0.820475 + ] + }, + "rss_peak_kb": 12856, + "heap_allocated_kb": 2209, + "memory_bytes": 54400 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:59.017545868Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 8857763.573752059, + "stddev": 411812.6739818057, + "n": 5, + "samples": [ + 9182061.923825614, + 8637368.711995577, + 8233773.2912861975, + 9116019.58121006, + 9119594.360442847 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.1148, + "stddev": 0.005310367218940701, + "n": 5, + "samples": [ + 0.11, + 0.117, + 0.123, + 0.111, + 0.113 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.11309720000000001, + "stddev": 0.005429740481827841, + "n": 5, + "samples": [ + 0.108908, + 0.115776, + 0.121451, + 0.109697, + 0.109654 + ] + }, + "rss_peak_kb": 12928, + "heap_allocated_kb": 1561, + "memory_bytes": 54400 + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:59.017555048Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.1502, + "stddev": 0.009311283477587834, + "n": 5, + "samples": [ + 0.149, + 0.165, + 0.141, + 0.152, + 0.144 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1492638, + "stddev": 0.009404371201733798, + "n": 5, + "samples": [ + 0.148569, + 0.164301, + 0.140107, + 0.150536, + 0.142806 + ] + }, + "rss_peak_kb": 13056, + "heap_allocated_kb": 965, + "memory_bytes": 54400, + "merge_folds_per_sec": { + "mean": 6720.021553902316, + "stddev": 406.67993788410524, + "n": 5, + "samples": [ + 6730.879254757048, + 6086.390222822746, + 7137.4021283733155, + 6642.929266089175, + 7002.506897469295 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:52:59.017563648Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.045087, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.045087 + ] + }, + "memory_bytes": 54400, + "accuracy": { + "aae_all": 0.104, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.104, + "accuracy_runs": 1, + "are_all": 0.006335943223443224, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.006335943223443223, + "l1_err": 104.0, + "l2_err": 40.049968789001575, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.006335943223443224, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:09.029761284Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 22728722.29657367, + "stddev": 1071124.792702381, + "n": 5, + "samples": [ + 24596766.755010054, + 22410018.17452474, + 22438177.212235987, + 22345669.632681884, + 21852979.70841569 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.3072, + "stddev": 0.4219066247405935, + "n": 5, + "samples": [ + 0.814, + 0.0, + 0.0, + 0.0, + 0.722 + ] + }, + "sys_ms": { + "mean": 0.5758000000000001, + "stddev": 0.44203698940247077, + "n": 5, + "samples": [ + 0.0, + 0.895, + 0.893, + 0.896, + 0.195 + ] + } + }, + "wall_time_ms": { + "mean": 0.8814292, + "stddev": 0.039409757049492185, + "n": 5, + "samples": [ + 0.813115, + 0.892458, + 0.891338, + 0.895028, + 0.915207 + ] + }, + "rss_peak_kb": 26264, + "heap_allocated_kb": 14082, + "memory_bytes": 544000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:19.095980355Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6364974.272871866, + "stddev": 52458.99915142277, + "n": 5, + "samples": [ + 6286421.9572146125, + 6373323.815836435, + 6416631.909910488, + 6405288.205942826, + 6343205.475454967 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.1588, + "stddev": 0.0021679483388678815, + "n": 5, + "samples": [ + 0.16, + 0.158, + 0.157, + 0.157, + 0.162 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.00044721359549995795, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.001, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.15711840000000002, + "stddev": 0.001300415241374835, + "n": 5, + "samples": [ + 0.159073, + 0.156904, + 0.155845, + 0.156121, + 0.157649 + ] + }, + "rss_peak_kb": 26640, + "heap_allocated_kb": 10102, + "memory_bytes": 544000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:19.095984881Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0954, + "stddev": 0.0011401754250991403, + "n": 5, + "samples": [ + 0.096, + 0.095, + 0.095, + 0.094, + 0.097 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.00044721359549995795, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.001 + ] + } + }, + "wall_time_ms": { + "mean": 0.094034, + "stddev": 0.0007807483589480032, + "n": 5, + "samples": [ + 0.094306, + 0.093642, + 0.093826, + 0.09317, + 0.095226 + ] + }, + "rss_peak_kb": 26640, + "heap_allocated_kb": 4746, + "memory_bytes": 544000, + "merge_folds_per_sec": { + "mean": 10635.035367831519, + "stddev": 87.92375862897931, + "n": 5, + "samples": [ + 10603.779186902211, + 10678.96883876893, + 10658.026559802187, + 10733.068584308254, + 10501.33366937601 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:19.095992785Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.118774, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.118774 + ] + }, + "memory_bytes": 544000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:29.111049162Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 1311310.924690102, + "stddev": 5087.0670143445095, + "n": 5, + "samples": [ + 1319582.5790819242, + 1311256.8383683192, + 1305805.729797194, + 1309211.718387512, + 1310697.7578155596 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 15.2536, + "stddev": 0.05943315572977692, + "n": 5, + "samples": [ + 15.157, + 15.254, + 15.318, + 15.278, + 15.261 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 15.252096, + "stddev": 0.059000250152012115, + "n": 5, + "samples": [ + 15.156308, + 15.252542, + 15.316214, + 15.276368, + 15.259048 + ] + }, + "rss_peak_kb": 14340, + "heap_allocated_kb": 2912, + "memory_bytes": 99600 + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:39.490777022Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 444296.29919579526, + "stddev": 11054.849402443224, + "n": 5, + "samples": [ + 463929.0522578963, + 441097.78652719746, + 437434.02948042896, + 439148.8943109139, + 439871.7334025398 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 2.2533999999999996, + "stddev": 0.05490719442841725, + "n": 5, + "samples": [ + 2.156, + 2.268, + 2.288, + 2.278, + 2.277 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 2.2518308, + "stddev": 0.05428632633269639, + "n": 5, + "samples": [ + 2.155502, + 2.267071, + 2.286059, + 2.277132, + 2.27339 + ] + }, + "rss_peak_kb": 14348, + "heap_allocated_kb": 1953, + "memory_bytes": 99600 + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:39.490792364Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.2572, + "stddev": 0.0024899799195977554, + "n": 5, + "samples": [ + 0.259, + 0.259, + 0.257, + 0.253, + 0.258 + ] + } + }, + "wall_time_ms": { + "mean": 0.25593879999999997, + "stddev": 0.0029676058869061417, + "n": 5, + "samples": [ + 0.258245, + 0.25783, + 0.255616, + 0.250942, + 0.257061 + ] + }, + "rss_peak_kb": 14412, + "heap_allocated_kb": 912, + "memory_bytes": 99600, + "merge_folds_per_sec": { + "mean": 3907.6092853175387, + "stddev": 45.84247420699244, + "n": 5, + "samples": [ + 3872.2918159112473, + 3878.5246092386456, + 3912.118177265899, + 3984.984578109683, + 3890.1272460622185 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:39.490802709Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 2.075238, + "stddev": 0.0, + "n": 1, + "samples": [ + 2.075238 + ] + }, + "memory_bytes": 99600, + "accuracy": { + "aae_all": 7.446, + "aae_top1": 9.0, + "aae_top10": 8.2, + "aae_top100": 6.92, + "aae_top1000": 7.446, + "accuracy_runs": 1, + "are_all": 0.3932923866316825, + "are_top1": 0.21951219512195122, + "are_top10": 0.24342994174400082, + "are_top100": 0.2454991949546276, + "are_top1000": 0.3932923866316827, + "l1_err": 7446.0, + "l2_err": 312.3747749098829, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.3932923866316825, + "relative_error_p99": 1.3846153846153846 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:53:49.554573010Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 1223691.645571603, + "stddev": 1932.8434335010577, + "n": 5, + "samples": [ + 1224378.8022318466, + 1223986.9121527455, + 1220302.8620861296, + 1224944.9754717017, + 1224844.6759155912 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 16.3452, + "stddev": 0.025635912310663266, + "n": 5, + "samples": [ + 16.336, + 16.342, + 16.39, + 16.328, + 16.33 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 16.3440194, + "stddev": 0.025865292493997084, + "n": 5, + "samples": [ + 16.334814, + 16.340044, + 16.389374, + 16.327264, + 16.328601 + ] + }, + "rss_peak_kb": 38508, + "heap_allocated_kb": 24799, + "memory_bytes": 996000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:00.033769345Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 480447.52494141465, + "stddev": 6635.975766405758, + "n": 5, + "samples": [ + 492185.8119564731, + 479018.73969211546, + 476288.00182894594, + 477599.6225052584, + 477145.4487242801 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 2.0836, + "stddev": 0.028684490582891766, + "n": 5, + "samples": [ + 2.033, + 2.089, + 2.101, + 2.095, + 2.1 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 2.081705, + "stddev": 0.02825815638890834, + "n": 5, + "samples": [ + 2.031753, + 2.087601, + 2.09957, + 2.093804, + 2.095797 + ] + }, + "rss_peak_kb": 38508, + "heap_allocated_kb": 17719, + "memory_bytes": 996000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:00.033773468Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.177, + "stddev": 0.0029154759474226545, + "n": 5, + "samples": [ + 0.176, + 0.182, + 0.175, + 0.177, + 0.175 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.17553999999999997, + "stddev": 0.003180600257812981, + "n": 5, + "samples": [ + 0.174667, + 0.180989, + 0.173478, + 0.175423, + 0.173143 + ] + }, + "rss_peak_kb": 38508, + "heap_allocated_kb": 7918, + "memory_bytes": 996000, + "merge_folds_per_sec": { + "mean": 5698.175368215685, + "stddev": 101.28504249728955, + "n": 5, + "samples": [ + 5725.17991377879, + 5525.197663946427, + 5764.419695869217, + 5700.506775052302, + 5775.572792431689 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:00.033779659Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 2.039277, + "stddev": 0.0, + "n": 1, + "samples": [ + 2.039277 + ] + }, + "memory_bytes": 996000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:10.097782268Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 28004908.130135383, + "stddev": 1999702.9441665332, + "n": 5, + "samples": [ + 31119298.94443338, + 27291310.17392752, + 27937487.07891223, + 25601343.55850995, + 28075100.89489384 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7186, + "stddev": 0.05001299831043926, + "n": 5, + "samples": [ + 0.644, + 0.735, + 0.717, + 0.783, + 0.714 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.716998, + "stddev": 0.04979563395017678, + "n": 5, + "samples": [ + 0.642688, + 0.732834, + 0.715884, + 0.781209, + 0.712375 + ] + }, + "rss_peak_kb": 11528, + "heap_allocated_kb": 1063, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:20.170278751Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 24132674.06538065, + "stddev": 183561.08686353985, + "n": 5, + "samples": [ + 24090897.588379685, + 24063495.273242, + 24457289.6596018, + 24030694.66882068, + 24020993.1368591 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0414, + "stddev": 0.0020736441353327714, + "n": 5, + "samples": [ + 0.041, + 0.041, + 0.04, + 0.04, + 0.045 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0394504, + "stddev": 0.0002972108679035809, + "n": 5, + "samples": [ + 0.039517, + 0.039562, + 0.038925, + 0.039616, + 0.039632 + ] + }, + "rss_peak_kb": 11528, + "heap_allocated_kb": 745, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:20.170282046Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.003, + "stddev": 0.001224744871391589, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.002, + 0.002 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0020031999999999997, + "stddev": 0.0010345444408047437, + "n": 5, + "samples": [ + 0.003821, + 0.001707, + 0.001756, + 0.001277, + 0.001455 + ] + }, + "rss_peak_kb": 11528, + "heap_allocated_kb": 649, + "memory_bytes": 5440, + "merge_folds_per_sec": { + "mean": 577476.2673858211, + "stddev": 196325.0529098306, + "n": 5, + "samples": [ + 261711.59382360635, + 585823.0814294084, + 569476.0820045559, + 783085.3563038372, + 687285.2233676976 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:20.170288822Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.034593, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.034593 + ] + }, + "memory_bytes": 5440, + "accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:30.184145503Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 1050781.7264742262, + "stddev": 7029.401743054476, + "n": 5, + "samples": [ + 1041376.2203302152, + 1046629.9822857876, + 1057773.5833529285, + 1050784.8522218214, + 1057343.9941803787 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 18.2376, + "stddev": 1.8377795841721607, + "n": 5, + "samples": [ + 19.207, + 19.111, + 14.956, + 18.997, + 18.917 + ] + }, + "sys_ms": { + "mean": 0.7981999999999999, + "stddev": 1.7636635733608608, + "n": 5, + "samples": [ + 0.0, + 0.0, + 3.953, + 0.038, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 19.034131000000002, + "stddev": 0.1275074702007703, + "n": 5, + "samples": [ + 19.205355, + 19.10895, + 18.907638, + 19.033392, + 18.91532 + ] + }, + "rss_peak_kb": 282980, + "heap_allocated_kb": 243573, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:40.847913352Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 263992.41077985184, + "stddev": 11719.462220063848, + "n": 5, + "samples": [ + 265786.88972663874, + 251365.81145082167, + 274980.71235602145, + 252382.25519451458, + 275446.38517126284 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 2.1672000000000002, + "stddev": 1.981787501222066, + "n": 5, + "samples": [ + 3.583, + 3.789, + 3.464, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 1.4468, + "stddev": 1.9842205522572331, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 3.774, + 3.46 + ] + } + }, + "wall_time_ms": { + "mean": 3.6118902, + "stddev": 0.1612567617270668, + "n": 5, + "samples": [ + 3.581817, + 3.787309, + 3.462061, + 3.772056, + 3.456208 + ] + }, + "rss_peak_kb": 282980, + "heap_allocated_kb": 175234, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:40.847917723Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 1.5812, + "stddev": 1.5759705581006265, + "n": 5, + "samples": [ + 3.35, + 0.0, + 0.0, + 1.632, + 2.924 + ] + }, + "sys_ms": { + "mean": 1.5648, + "stddev": 1.6016370375337854, + "n": 5, + "samples": [ + 0.0, + 3.27, + 3.126, + 1.428, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 3.1441938, + "stddev": 0.1686617339920351, + "n": 5, + "samples": [ + 3.347632, + 3.268292, + 3.124724, + 3.057866, + 2.922455 + ] + }, + "rss_peak_kb": 282980, + "heap_allocated_kb": 77909, + "memory_bytes": 9960000, + "merge_folds_per_sec": { + "mean": 318.78412184328727, + "stddev": 17.2014878463438, + "n": 5, + "samples": [ + 298.7186166221377, + 305.97021318780577, + 320.0282648963556, + 327.0254484663488, + 342.17806604378853 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:40.847925832Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 3.619459, + "stddev": 0.0, + "n": 1, + "samples": [ + 3.619459 + ] + }, + "memory_bytes": 9960000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:54:50.944031928Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 570786343.5171742, + "stddev": 94251486.59796189, + "n": 5, + "samples": [ + 683971136.4180431, + 422038869.7799067, + 577934462.231983, + 593418983.4732814, + 576568265.6826569 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0372, + "stddev": 0.007049822692805827, + "n": 5, + "samples": [ + 0.03, + 0.049, + 0.036, + 0.035, + 0.036 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0359254, + "stddev": 0.006787974020280279, + "n": 5, + "samples": [ + 0.029241, + 0.047389, + 0.034606, + 0.033703, + 0.034688 + ] + }, + "rss_peak_kb": 19564, + "heap_allocated_kb": 3289, + "memory_bytes": 262144 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:01.014077118Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 18929845.303032693, + "stddev": 882427.9371693508, + "n": 5, + "samples": [ + 19540630.9653318, + 17718220.73329611, + 18347562.97338447, + 19863956.933605976, + 19178854.909545105 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.052000000000000005, + "stddev": 0.0024494897427831757, + "n": 5, + "samples": [ + 0.05, + 0.055, + 0.053, + 0.049, + 0.053 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.05038, + "stddev": 0.00238878368631402, + "n": 5, + "samples": [ + 0.048719, + 0.05373, + 0.051887, + 0.047926, + 0.049638 + ] + }, + "rss_peak_kb": 19600, + "heap_allocated_kb": 2157, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:01.014089591Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.04523, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.04523 + ] + }, + "memory_bytes": 290816, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:11.029581719Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "latency", + "operation": "prepare", + "cpu_time_ms": { + "user_ms": { + "mean": 0.562, + "stddev": 0.31469667935966533, + "n": 5, + "samples": [ + 0.731, + 0.705, + 0.683, + 0.691, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.13979999999999998, + "stddev": 0.3126023032544706, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.699 + ] + } + }, + "wall_time_ms": { + "mean": 0.6622604000000001, + "stddev": 0.019096538450724513, + "n": 5, + "samples": [ + 0.693298, + 0.664156, + 0.643068, + 0.65158, + 0.6592 + ] + }, + "rss_peak_kb": 18944, + "heap_allocated_kb": 1860, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:21.049786514Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 25174661.53374953, + "stddev": 1485342.7616920352, + "n": 5, + "samples": [ + 27825041.702781253, + 24510705.05043078, + 24536324.802053202, + 24353179.551122196, + 24648056.562360197 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7978, + "stddev": 0.043665776072342975, + "n": 5, + "samples": [ + 0.72, + 0.817, + 0.817, + 0.823, + 0.812 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7965072, + "stddev": 0.043593963821841254, + "n": 5, + "samples": [ + 0.718777, + 0.81597, + 0.815118, + 0.821248, + 0.811423 + ] + }, + "rss_peak_kb": 13252, + "heap_allocated_kb": 2221, + "memory_bytes": 54400 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:31.140036354Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 8576316.818916982, + "stddev": 681813.9449329216, + "n": 5, + "samples": [ + 9665563.38457165, + 8630067.445064908, + 8038503.757493878, + 8588182.228236355, + 7959267.279218119 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.11340000000000001, + "stddev": 0.008933084573650905, + "n": 5, + "samples": [ + 0.1, + 0.112, + 0.12, + 0.112, + 0.123 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.111539, + "stddev": 0.008437461940654901, + "n": 5, + "samples": [ + 0.098494, + 0.110312, + 0.11843, + 0.11085, + 0.119609 + ] + }, + "rss_peak_kb": 13260, + "heap_allocated_kb": 1573, + "memory_bytes": 54400 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:31.140045691Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.15159999999999998, + "stddev": 0.00527257053058563, + "n": 5, + "samples": [ + 0.159, + 0.15, + 0.147, + 0.155, + 0.147 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1499124, + "stddev": 0.004950865863664654, + "n": 5, + "samples": [ + 0.156944, + 0.148644, + 0.145692, + 0.152882, + 0.1454 + ] + }, + "rss_peak_kb": 13324, + "heap_allocated_kb": 977, + "memory_bytes": 54400, + "merge_folds_per_sec": { + "mean": 6676.309784024607, + "stddev": 217.58730442549117, + "n": 5, + "samples": [ + 6371.699459679886, + 6727.483114017384, + 6863.794854899376, + 6540.992399366833, + 6877.579092159559 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:31.140052236Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.152321, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.152321 + ] + }, + "memory_bytes": 54400, + "accuracy": { + "aae_all": 0.015756302521008403, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.05, + "accuracy_runs": 1, + "are_all": 0.007412989350329503, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0008494363929146537, + "l1_err": 15.0, + "l2_err": 6.557438524302, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.007412989350329503, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:41.154366854Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 23219202.465134893, + "stddev": 942870.5108129231, + "n": 5, + "samples": [ + 24883637.888324723, + 22855627.855525006, + 22938515.60277831, + 22873925.783260405, + 22544305.195786018 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.2978, + "stddev": 0.40994414253651684, + "n": 5, + "samples": [ + 0.804, + 0.0, + 0.0, + 0.0, + 0.685 + ] + }, + "sys_ms": { + "mean": 0.5658000000000001, + "stddev": 0.42937244904627964, + "n": 5, + "samples": [ + 0.001, + 0.876, + 0.873, + 0.876, + 0.203 + ] + } + }, + "wall_time_ms": { + "mean": 0.8624390000000001, + "stddev": 0.0333407782752592, + "n": 5, + "samples": [ + 0.803741, + 0.875058, + 0.871896, + 0.874358, + 0.887142 + ] + }, + "rss_peak_kb": 26588, + "heap_allocated_kb": 14094, + "memory_bytes": 544000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:51.219418192Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6238332.937434685, + "stddev": 46974.9745428271, + "n": 5, + "samples": [ + 6177526.0046591, + 6232609.9053978855, + 6211382.750363744, + 6285695.42108217, + 6284450.6056705285 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.1544, + "stddev": 0.0015165750888103107, + "n": 5, + "samples": [ + 0.155, + 0.154, + 0.155, + 0.152, + 0.156 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.15261180000000002, + "stddev": 0.0011500561725411582, + "n": 5, + "samples": [ + 0.154107, + 0.152745, + 0.153267, + 0.151455, + 0.151485 + ] + }, + "rss_peak_kb": 26588, + "heap_allocated_kb": 10114, + "memory_bytes": 544000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:51.219422361Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0954, + "stddev": 0.0011401754250991388, + "n": 5, + "samples": [ + 0.096, + 0.095, + 0.094, + 0.097, + 0.095 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0941534, + "stddev": 0.0009995512993338583, + "n": 5, + "samples": [ + 0.094111, + 0.093567, + 0.093057, + 0.095709, + 0.094323 + ] + }, + "rss_peak_kb": 26588, + "heap_allocated_kb": 4758, + "memory_bytes": 544000, + "merge_folds_per_sec": { + "mean": 10621.917451774545, + "stddev": 112.10824444149308, + "n": 5, + "samples": [ + 10625.750443625082, + 10687.528722733443, + 10746.101851553349, + 10448.338191810592, + 10601.86804915026 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:55:51.219429398Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.633519, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.633519 + ] + }, + "memory_bytes": 544000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:01.235904631Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 983985.5692719497, + "stddev": 48347.35884312693, + "n": 5, + "samples": [ + 1015734.489036035, + 1009347.0074955623, + 1004471.4549050827, + 898989.9802622255, + 991384.9146608431 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 20.3662, + "stddev": 1.0714138789468801, + "n": 5, + "samples": [ + 19.66, + 19.822, + 19.917, + 22.253, + 20.179 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 20.3673866, + "stddev": 1.0657642975455686, + "n": 5, + "samples": [ + 19.690185, + 19.814791, + 19.910969, + 22.247189, + 20.173799 + ] + }, + "rss_peak_kb": 14540, + "heap_allocated_kb": 2921, + "memory_bytes": 99600 + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:11.885475152Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 297007.43855232355, + "stddev": 18479.763243343983, + "n": 5, + "samples": [ + 328955.5522997863, + 297134.15357341274, + 285265.7541159024, + 287442.1303809725, + 286239.6023915439 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 3.2204, + "stddev": 0.1875467941608172, + "n": 5, + "samples": [ + 2.899, + 3.209, + 3.343, + 3.317, + 3.334 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 3.2146085999999996, + "stddev": 0.18694829023101558, + "n": 5, + "samples": [ + 2.894008, + 3.20394, + 3.337239, + 3.311971, + 3.325885 + ] + }, + "rss_peak_kb": 14608, + "heap_allocated_kb": 1943, + "memory_bytes": 99600 + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:11.885488542Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.3194, + "stddev": 0.011970797801316343, + "n": 5, + "samples": [ + 0.311, + 0.321, + 0.32, + 0.338, + 0.307 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.31707320000000005, + "stddev": 0.012142504239241588, + "n": 5, + "samples": [ + 0.308665, + 0.318765, + 0.317395, + 0.336013, + 0.304528 + ] + }, + "rss_peak_kb": 14672, + "heap_allocated_kb": 897, + "memory_bytes": 99600, + "merge_folds_per_sec": { + "mean": 3157.4718914817513, + "stddev": 118.41487861947662, + "n": 5, + "samples": [ + 3239.7583140297734, + 3137.1072733832134, + 3150.648245876589, + 2976.0753304187633, + 3283.770293700415 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:11.885502786Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 2.838657, + "stddev": 0.0, + "n": 1, + "samples": [ + 2.838657 + ] + }, + "memory_bytes": 99600, + "accuracy": { + "aae_all": 2.2815126050420167, + "aae_top1": 1.0, + "aae_top10": 0.8, + "aae_top100": 2.01, + "accuracy_runs": 1, + "are_all": 0.6369033391351014, + "are_top1": 0.0002805836139169473, + "are_top10": 0.001555601294898813, + "are_top100": 0.04553785988253641, + "l1_err": 2172.0, + "l2_err": 102.52804494381037, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.6369033391351014, + "relative_error_p99": 4.5 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:21.951503596Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 1216934.8677931523, + "stddev": 17588.6736754695, + "n": 5, + "samples": [ + 1230601.5660389408, + 1192526.9108604023, + 1223835.1689841005, + 1204714.4814631788, + 1232996.2116191399 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 15.669, + "stddev": 1.7911845242743694, + "n": 5, + "samples": [ + 16.255, + 16.772, + 12.492, + 16.604, + 16.222 + ] + }, + "sys_ms": { + "mean": 0.7711999999999999, + "stddev": 1.722778627682617, + "n": 5, + "samples": [ + 0.0, + 0.001, + 3.853, + 0.001, + 0.001 + ] + } + }, + "wall_time_ms": { + "mean": 16.4374976, + "stddev": 0.2390789495141724, + "n": 5, + "samples": [ + 16.252214, + 16.77111, + 16.34207, + 16.601444, + 16.22065 + ] + }, + "rss_peak_kb": 39244, + "heap_allocated_kb": 24773, + "memory_bytes": 996000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:32.542482687Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 316743.3788686749, + "stddev": 19624.004920500338, + "n": 5, + "samples": [ + 338155.9630713797, + 319552.5190607036, + 320086.71929268906, + 284482.18415380444, + 321439.5087647978 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 1.6515999999999997, + "stddev": 1.5933541037697803, + "n": 5, + "samples": [ + 0.0, + 1.938, + 2.977, + 3.343, + 0.0 + ] + }, + "sys_ms": { + "mean": 1.3668, + "stddev": 1.4575073584719906, + "n": 5, + "samples": [ + 2.818, + 1.043, + 0.0, + 0.005, + 2.968 + ] + } + }, + "wall_time_ms": { + "mean": 3.0153474, + "stddev": 0.19718704585316957, + "n": 5, + "samples": [ + 2.815269, + 2.979166, + 2.974194, + 3.346431, + 2.961677 + ] + }, + "rss_peak_kb": 39316, + "heap_allocated_kb": 17699, + "memory_bytes": 996000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:32.542489629Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.5328, + "stddev": 1.1057032603732342, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.157, + 2.507, + 0.0 + ] + }, + "sys_ms": { + "mean": 2.124, + "stddev": 1.2123172027155271, + "n": 5, + "samples": [ + 2.929, + 2.525, + 2.321, + 0.0, + 2.845 + ] + } + }, + "wall_time_ms": { + "mean": 2.6545592, + "stddev": 0.21302448069928506, + "n": 5, + "samples": [ + 2.926974, + 2.522156, + 2.475932, + 2.504864, + 2.84287 + ] + }, + "rss_peak_kb": 39380, + "heap_allocated_kb": 7878, + "memory_bytes": 996000, + "merge_folds_per_sec": { + "mean": 378.6009481680373, + "stddev": 29.455851150626135, + "n": 5, + "samples": [ + 341.649772085437, + 396.486180870652, + 403.8883135724244, + 399.2232712035464, + 351.75720310812665 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:32.542496954Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 2.506487, + "stddev": 0.0, + "n": 1, + "samples": [ + 2.506487 + ] + }, + "memory_bytes": 996000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:56:42.616696562Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 27980993.616275582, + "stddev": 1842098.5039640686, + "n": 5, + "samples": [ + 31242287.060381968, + 26710436.168067407, + 27310987.48337444, + 27351325.03494132, + 27289932.33461278 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7182, + "stddev": 0.04386000455996331, + "n": 5, + "samples": [ + 0.641, + 0.751, + 0.733, + 0.732, + 0.734 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7170664, + "stddev": 0.043596469791715914, + "n": 5, + "samples": [ + 0.640158, + 0.748771, + 0.732306, + 0.731226, + 0.732871 + ] + }, + "rss_peak_kb": 11284, + "heap_allocated_kb": 1111, + "memory_bytes": 10240 + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:29.368430923Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 23618370.59076393, + "stddev": 534531.4768930095, + "n": 5, + "samples": [ + 23597706.302947354, + 22864459.484177794, + 24091741.351064853, + 23378687.98803011, + 24159257.827599537 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.044399999999999995, + "stddev": 0.0011401754250991395, + "n": 5, + "samples": [ + 0.044, + 0.045, + 0.043, + 0.044, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.042357399999999996, + "stddev": 0.0009653956701788113, + "n": 5, + "samples": [ + 0.042377, + 0.043736, + 0.041508, + 0.042774, + 0.041392 + ] + }, + "rss_peak_kb": 11284, + "heap_allocated_kb": 793, + "memory_bytes": 10240 + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:29.368434163Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.004, + "stddev": 0.0017320508075688774, + "n": 5, + "samples": [ + 0.007, + 0.003, + 0.004, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0030032, + "stddev": 0.0019423232738141195, + "n": 5, + "samples": [ + 0.006468, + 0.00192, + 0.002121, + 0.002183, + 0.002324 + ] + }, + "rss_peak_kb": 11284, + "heap_allocated_kb": 657, + "memory_bytes": 10240, + "merge_folds_per_sec": { + "mean": 407058.8305226917, + "stddev": 144887.41174209333, + "n": 5, + "samples": [ + 154607.29746444031, + 520833.3333333334, + 471475.71900047146, + 458085.2038479157, + 430292.59896729776 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:29.368440582Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.048194, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.048194 + ] + }, + "memory_bytes": 10240, + "accuracy": { + "aae_all": 9.229, + "aae_top1": 0.0, + "aae_top10": 5.7, + "aae_top100": 9.32, + "aae_top1000": 9.229, + "accuracy_runs": 1, + "are_all": 0.4857875000848293, + "are_top1": 0.0, + "are_top10": 0.17943548387096775, + "are_top100": 0.3330711319229116, + "are_top1000": 0.48578750008482907, + "l1_err": 9229.0, + "l2_err": 467.7210707248499, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.4857875000848293, + "relative_error_p99": 2.3684210526315788 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:39.378928498Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 23866037.558692742, + "stddev": 1486734.5852393098, + "n": 5, + "samples": [ + 26506812.913589116, + 23146380.021896474, + 22952072.62953863, + 23301604.315457117, + 23423317.912982374 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.8417999999999999, + "stddev": 0.04838594837346897, + "n": 5, + "samples": [ + 0.756, + 0.866, + 0.872, + 0.86, + 0.855 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.840426, + "stddev": 0.04846758779328715, + "n": 5, + "samples": [ + 0.754523, + 0.864066, + 0.871381, + 0.85831, + 0.85385 + ] + }, + "rss_peak_kb": 13852, + "heap_allocated_kb": 2809, + "memory_bytes": 81920 + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:49.454214745Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6333722.406897154, + "stddev": 679420.7403474726, + "n": 5, + "samples": [ + 6643900.235194068, + 6530399.007379351, + 5123817.038741181, + 6668711.738266402, + 6701784.014904767 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.1614, + "stddev": 0.019932385707686878, + "n": 5, + "samples": [ + 0.152, + 0.154, + 0.197, + 0.151, + 0.153 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1595958, + "stddev": 0.019939546188416625, + "n": 5, + "samples": [ + 0.150514, + 0.15313, + 0.195167, + 0.149954, + 0.149214 + ] + }, + "rss_peak_kb": 13860, + "heap_allocated_kb": 1993, + "memory_bytes": 81920 + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:49.454224095Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.22399999999999998, + "stddev": 0.027973201461398728, + "n": 5, + "samples": [ + 0.274, + 0.213, + 0.211, + 0.21, + 0.212 + ] + } + }, + "wall_time_ms": { + "mean": 0.2226566, + "stddev": 0.027770196835816635, + "n": 5, + "samples": [ + 0.272297, + 0.211404, + 0.209545, + 0.208881, + 0.211156 + ] + }, + "rss_peak_kb": 13924, + "heap_allocated_kb": 1130, + "memory_bytes": 81920, + "merge_folds_per_sec": { + "mean": 4539.646927302015, + "stddev": 485.3692799128041, + "n": 5, + "samples": [ + 3672.4605853167677, + 4730.279464910787, + 4772.244625259491, + 4787.414843858464, + 4735.835117164561 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:49.454232591Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.05739, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.05739 + ] + }, + "memory_bytes": 81920, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:57:59.464130508Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 22514485.921863534, + "stddev": 998470.0989676868, + "n": 5, + "samples": [ + 24191724.253050275, + 22348616.061950363, + 22309750.811238315, + 22215829.00032102, + 21506509.48275769 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.8907999999999999, + "stddev": 0.038596631977414905, + "n": 5, + "samples": [ + 0.827, + 0.896, + 0.897, + 0.902, + 0.932 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.00044721359549995795, + "n": 5, + "samples": [ + 0.001, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.8896636000000001, + "stddev": 0.03798005779089853, + "n": 5, + "samples": [ + 0.826729, + 0.89491, + 0.896469, + 0.900259, + 0.929951 + ] + }, + "rss_peak_kb": 29312, + "heap_allocated_kb": 16782, + "memory_bytes": 655360 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:09.535935967Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6299878.957075936, + "stddev": 82005.50949390283, + "n": 5, + "samples": [ + 6260760.682422915, + 6262721.1523406925, + 6443132.908945646, + 6241651.790729899, + 6291128.250940524 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.16040000000000001, + "stddev": 0.0026076809620810583, + "n": 5, + "samples": [ + 0.161, + 0.161, + 0.156, + 0.161, + 0.163 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1587544, + "stddev": 0.0020350172726539663, + "n": 5, + "samples": [ + 0.159725, + 0.159675, + 0.155204, + 0.160214, + 0.158954 + ] + }, + "rss_peak_kb": 29312, + "heap_allocated_kb": 12046, + "memory_bytes": 655360 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:09.535940283Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.113, + "stddev": 0.003000000000000003, + "n": 5, + "samples": [ + 0.116, + 0.114, + 0.113, + 0.114, + 0.108 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1112552, + "stddev": 0.0029262140557382308, + "n": 5, + "samples": [ + 0.113776, + 0.111896, + 0.111722, + 0.112657, + 0.106225 + ] + }, + "rss_peak_kb": 29312, + "heap_allocated_kb": 5610, + "memory_bytes": 655360, + "merge_folds_per_sec": { + "mean": 8993.467868920761, + "stddev": 243.54759379354093, + "n": 5, + "samples": [ + 8789.199831247362, + 8936.869950668477, + 8950.78856447253, + 8876.501238271923, + 9413.979759943517 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:09.535948594Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.069832, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.069832 + ] + }, + "memory_bytes": 655360, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:19.550894769Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 27922645.889863245, + "stddev": 1888179.5330403177, + "n": 5, + "samples": [ + 31277807.926109307, + 26874857.227320977, + 27302934.246343456, + 26857714.54278098, + 27299915.506761506 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7198, + "stddev": 0.04497999555357912, + "n": 5, + "samples": [ + 0.64, + 0.745, + 0.734, + 0.746, + 0.734 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7186822, + "stddev": 0.04469853239984509, + "n": 5, + "samples": [ + 0.639431, + 0.74419, + 0.732522, + 0.744665, + 0.732603 + ] + }, + "rss_peak_kb": 11480, + "heap_allocated_kb": 1123, + "memory_bytes": 10240 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:29.666549460Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 23507935.060018077, + "stddev": 132860.1428471702, + "n": 5, + "samples": [ + 23491092.1383803, + 23589464.033501003, + 23467350.309364755, + 23320187.149401072, + 23671581.669443272 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0426, + "stddev": 0.001949358868961792, + "n": 5, + "samples": [ + 0.042, + 0.041, + 0.042, + 0.042, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.040498, + "stddev": 0.0002291353311909791, + "n": 5, + "samples": [ + 0.040526, + 0.040357, + 0.040567, + 0.040823, + 0.040217 + ] + }, + "rss_peak_kb": 11480, + "heap_allocated_kb": 805, + "memory_bytes": 10240 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:29.666553085Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0038, + "stddev": 0.0017888543819998318, + "n": 5, + "samples": [ + 0.007, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0026918000000000003, + "stddev": 0.00149803728258011, + "n": 5, + "samples": [ + 0.005353, + 0.002031, + 0.002257, + 0.002056, + 0.001762 + ] + }, + "rss_peak_kb": 11480, + "heap_allocated_kb": 669, + "memory_bytes": 10240, + "merge_folds_per_sec": { + "mean": 435232.7310234324, + "stddev": 145910.6673992023, + "n": 5, + "samples": [ + 186811.13394358303, + 492368.29148202855, + 443066.0168365086, + 486381.3229571985, + 567536.8898978434 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:29.666559855Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.046524, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.046524 + ] + }, + "memory_bytes": 10240, + "accuracy": { + "aae_all": 1.694327731092437, + "aae_top1": 2.0, + "aae_top10": 1.8, + "aae_top100": 1.46, + "accuracy_runs": 1, + "are_all": 0.49153700428012315, + "are_top1": 0.0005611672278338945, + "are_top10": 0.003950663328809479, + "are_top100": 0.03129160657746158, + "l1_err": 1613.0, + "l2_err": 107.81001808737442, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.49153700428012315, + "relative_error_p99": 5.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:39.680354299Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 23618218.139705643, + "stddev": 2653535.3827046547, + "n": 5, + "samples": [ + 27086287.431556337, + 23809353.74271136, + 23730872.91642936, + 23850637.766053863, + 19613938.8417773 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.4244, + "stddev": 0.4777324565067774, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.263, + 0.839, + 1.02 + ] + }, + "sys_ms": { + "mean": 0.4326, + "stddev": 0.4048361396911101, + "n": 5, + "samples": [ + 0.74, + 0.841, + 0.58, + 0.001, + 0.001 + ] + } + }, + "wall_time_ms": { + "mean": 0.8558812, + "stddev": 0.10168724905168784, + "n": 5, + "samples": [ + 0.738381, + 0.840006, + 0.842784, + 0.838552, + 1.019683 + ] + }, + "rss_peak_kb": 14200, + "heap_allocated_kb": 2821, + "memory_bytes": 81920 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:49.798211378Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6740846.250834807, + "stddev": 136710.9851419851, + "n": 5, + "samples": [ + 6636366.171262861, + 6566921.203843581, + 6801846.215401323, + 6905406.091554659, + 6793691.57211161 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.1432, + "stddev": 0.0027748873851023087, + "n": 5, + "samples": [ + 0.145, + 0.146, + 0.142, + 0.139, + 0.144 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.000447213595499958, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.001, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.14127520000000002, + "stddev": 0.0028749653389214904, + "n": 5, + "samples": [ + 0.143452, + 0.144969, + 0.139962, + 0.137863, + 0.14013 + ] + }, + "rss_peak_kb": 14208, + "heap_allocated_kb": 2005, + "memory_bytes": 81920 + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:49.798220413Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.2056, + "stddev": 0.00568330889535312, + "n": 5, + "samples": [ + 0.215, + 0.206, + 0.204, + 0.203, + 0.2 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.20420520000000003, + "stddev": 0.005583532278047665, + "n": 5, + "samples": [ + 0.213337, + 0.204454, + 0.203268, + 0.201521, + 0.198446 + ] + }, + "rss_peak_kb": 14272, + "heap_allocated_kb": 1142, + "memory_bytes": 81920, + "merge_folds_per_sec": { + "mean": 4899.904983840585, + "stddev": 131.23951331790553, + "n": 5, + "samples": [ + 4687.419434978461, + 4891.07574319896, + 4919.613515162249, + 4962.261997508945, + 5039.154228354313 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:49.798228851Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.041808, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.041808 + ] + }, + "memory_bytes": 81920, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:58:59.812679275Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 22930949.22290827, + "stddev": 1086404.7906464343, + "n": 5, + "samples": [ + 24777989.216619093, + 22519530.062446658, + 22801325.21302138, + 22645824.959095977, + 21910076.663358245 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.33940000000000003, + "stddev": 0.4656240973145613, + "n": 5, + "samples": [ + 0.808, + 0.889, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.5356000000000001, + "stddev": 0.4886637903507891, + "n": 5, + "samples": [ + 0.0, + 0.001, + 0.878, + 0.885, + 0.914 + ] + } + }, + "wall_time_ms": { + "mean": 0.8736829999999999, + "stddev": 0.039580136356511024, + "n": 5, + "samples": [ + 0.807168, + 0.888118, + 0.877142, + 0.883165, + 0.912822 + ] + }, + "rss_peak_kb": 29444, + "heap_allocated_kb": 16794, + "memory_bytes": 655360 + }, + "source": "cli", + "timestamp": "2026-09-08T16:59:10.266196678Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 6524202.751988709, + "stddev": 98217.2134102652, + "n": 5, + "samples": [ + 6482629.00567911, + 6498337.872613465, + 6659624.62662031, + 6578356.378310773, + 6402065.876719884 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0304, + "stddev": 0.06797646651599361, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.152 + ] + }, + "sys_ms": { + "mean": 0.1172, + "stddev": 0.0655377753665777, + "n": 5, + "samples": [ + 0.148, + 0.148, + 0.144, + 0.146, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.1459446, + "stddev": 0.0021912476582988012, + "n": 5, + "samples": [ + 0.146854, + 0.146499, + 0.142951, + 0.144717, + 0.148702 + ] + }, + "rss_peak_kb": 29444, + "heap_allocated_kb": 12058, + "memory_bytes": 655360 + }, + "source": "cli", + "timestamp": "2026-09-08T16:59:10.266200644Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.1084, + "stddev": 0.0030495901363953833, + "n": 5, + "samples": [ + 0.11, + 0.109, + 0.11, + 0.11, + 0.103 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.106782, + "stddev": 0.003362997100801607, + "n": 5, + "samples": [ + 0.108341, + 0.107246, + 0.108246, + 0.109184, + 0.100893 + ] + }, + "rss_peak_kb": 29444, + "heap_allocated_kb": 5622, + "memory_bytes": 655360, + "merge_folds_per_sec": { + "mean": 9372.60625346414, + "stddev": 306.91178929148936, + "n": 5, + "samples": [ + 9230.116022558404, + 9324.35708557895, + 9238.216654656986, + 9158.851113716295, + 9911.490390810066 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:59:10.266215474Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.06671, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.06671 + ] + }, + "memory_bytes": 655360, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:59:20.286100386Z" + } + ] +] diff --git a/tools/empirical-bench/results-sweep/planner-evidence.json b/tools/empirical-bench/results-sweep/planner-evidence.json new file mode 100644 index 00000000..1dc7ceb4 --- /dev/null +++ b/tools/empirical-bench/results-sweep/planner-evidence.json @@ -0,0 +1,2194 @@ +{ + "schema_version": 1, + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "records": [ + { + "id": "cms-uniform-seed42-w272-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886308, + "valid_until_unix_seconds": 1791478308, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 505.475, + "stddev": 2.9324591056398384, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 39.18329, + "stddev": 1.2404534228458564, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1540.0, + "stddev": 49.21381919745713, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 41.56236, + "stddev": 1.2531359914231197, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 1669, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 1.6347221960194194, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w30000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886328, + "valid_until_unix_seconds": 1791478328, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5313752.5, + "stddev": 285040.9840468121, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 958.89495, + "stddev": 0.37400001336898875, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 900674.8, + "stddev": 6828.900035876935, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1381.6785599999998, + "stddev": 1.1267877186941877, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2490679, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 2498560, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w2720-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 2720, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886379, + "valid_until_unix_seconds": 1791478379, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 9061.88984375, + "stddev": 4977.459586428361, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 34.73418, + "stddev": 0.27307644442536533, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 2460.0, + "stddev": 107.4406813083387, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 36.6688, + "stddev": 0.01859623617832312, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 13781, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 16384, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.006335943223443224, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.104, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.104, + "accuracy_runs": 1, + "are_all": 0.006335943223443224, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.006335943223443223, + "l1_err": 104.0, + "l2_err": 40.049968789001575, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.006335943223443224, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w27200-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 27200, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886399, + "valid_until_unix_seconds": 1791478399, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 31745.793103448275, + "stddev": 915.6813529123244, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 46.32539, + "stddev": 0.22768290833964674, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 37594.2, + "stddev": 2734.4467813435317, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 50.47502, + "stddev": 0.05519897643978545, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 136183, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 143360, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w300-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 300, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886419, + "valid_until_unix_seconds": 1791478419, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 6091.32, + "stddev": 99.73249556626484, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 757.95226, + "stddev": 0.2581798365480518, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8584.4, + "stddev": 165.01908980478592, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 2104.83466, + "stddev": 1.6008204155995156, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 29755, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 32768, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.3932923866316825, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.446, + "aae_top1": 9.0, + "aae_top10": 8.2, + "aae_top100": 6.92, + "aae_top1000": 7.446, + "accuracy_runs": 1, + "are_all": 0.3932923866316825, + "are_top1": 0.2195121951219512, + "are_top10": 0.2434299417440008, + "are_top100": 0.2454991949546276, + "are_top1000": 0.3932923866316827, + "l1_err": 7446.0, + "l2_err": 312.3747749098829, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.3932923866316825, + "relative_error_p99": 1.3846153846153846 + } + } + } + }, + { + "id": "countsketch-uniform-seed42-w3000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 3000, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886440, + "valid_until_unix_seconds": 1791478440, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 51035.7375, + "stddev": 951.9281311091058, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 774.44066, + "stddev": 0.6066855995901015, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 68290.8, + "stddev": 247.88848299184858, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1519.04208, + "stddev": 7.1756951556626465, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 251754, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 258048, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w272-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886460, + "valid_until_unix_seconds": 1791478460, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 413.40859375, + "stddev": 2.7002030472877463, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.40953, + "stddev": 0.1888592286598663, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1104.6, + "stddev": 114.85773809369572, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 35.77964285714286, + "stddev": 0.26766073908351545, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 1722, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 2.3164860214890104, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w30000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886480, + "valid_until_unix_seconds": 1791478480, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 4991299.4, + "stddev": 127408.84023557784, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 862.07043, + "stddev": 67.54045694576882, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 906510.0, + "stddev": 10240.438638066242, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1383.6344117647059, + "stddev": 2.9386960922807495, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2495217, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 2502656, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w2720-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 2720, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886531, + "valid_until_unix_seconds": 1791478531, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 13362.875, + "stddev": 3039.657607879287, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.83039, + "stddev": 0.16780548039322382, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 2661.8, + "stddev": 223.53120587515292, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 37.005063025210085, + "stddev": 0.16744114940021262, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 54400.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 13933, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 16384, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.007412989350329503, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.015756302521008403, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.05, + "accuracy_runs": 1, + "are_all": 0.007412989350329503, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0008494363929146537, + "l1_err": 15.0, + "l2_err": 6.557438524302, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.007412989350329503, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w27200-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 27200, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886551, + "valid_until_unix_seconds": 1791478551, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 29308.56551724138, + "stddev": 325.16572706768056, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 37.90535, + "stddev": 0.20893840898695612, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 33239.0, + "stddev": 1520.0851949808603, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 42.75764705882353, + "stddev": 0.029966574634030334, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 544000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 136338, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 143360, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w300-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 300, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886571, + "valid_until_unix_seconds": 1791478571, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5789.295, + "stddev": 50.43642858217649, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 756.83812, + "stddev": 0.15442492755380408, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8532.4, + "stddev": 65.54998093058457, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 2100.1955042016807, + "stddev": 4.949446360451842, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 99600.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 29853, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 32768, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.6369033391351014, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 2.2815126050420167, + "aae_top1": 1.0, + "aae_top10": 0.8, + "aae_top100": 2.01, + "accuracy_runs": 1, + "are_all": 0.6369033391351014, + "are_top1": 0.0002805836139169473, + "are_top10": 0.001555601294898813, + "are_top100": 0.04553785988253641, + "l1_err": 2172.0, + "l2_err": 102.52804494381036, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.6369033391351014, + "relative_error_p99": 4.5 + } + } + } + }, + { + "id": "countsketch-zipf-seed42-w3000-d83", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 3000, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886592, + "valid_until_unix_seconds": 1791478592, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 51510.1875, + "stddev": 1338.8413243535902, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 763.80445, + "stddev": 1.0832422484144655, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 68282.4, + "stddev": 462.2210510134734, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 1500.9115756302522, + "stddev": 13.696449994980448, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 996000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 254181, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 262144, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w512-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886649, + "valid_until_unix_seconds": 1791478649, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 653.75078125, + "stddev": 14.656944769230105, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 33.62379, + "stddev": 0.07565315095883289, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1184.0, + "stddev": 10.770329614269007, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 35.6547, + "stddev": 0.008609006911371453, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2759, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.4857875000848293, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 9.229, + "aae_top1": 0.0, + "aae_top10": 5.7, + "aae_top100": 9.32, + "aae_top1000": 9.229, + "accuracy_runs": 1, + "are_all": 0.4857875000848293, + "are_top1": 0.0, + "are_top10": 0.17943548387096775, + "are_top100": 0.3330711319229116, + "are_top1000": 0.485787500084829, + "l1_err": 9229.0, + "l2_err": 467.7210707248499, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.4857875000848293, + "relative_error_p99": 2.3684210526315788 + } + } + } + }, + { + "id": "cms-uniform-seed42-w4096-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 4096, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886669, + "valid_until_unix_seconds": 1791478669, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 4973.88, + "stddev": 300.623465532763, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 35.00645, + "stddev": 0.3773887451951894, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 5853.0, + "stddev": 1073.9336571688216, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 37.45286, + "stddev": 0.01899928946039723, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 20661, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 24576, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-uniform-seed42-w32768-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 32768, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886689, + "valid_until_unix_seconds": 1791478689, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 35327.308333333334, + "stddev": 703.0214501528393, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 42.568979999999996, + "stddev": 0.47701038982395344, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 42699.4, + "stddev": 3601.5573437056364, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 46.04674, + "stddev": 0.23154995789245925, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 164023, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 172032, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w512-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886709, + "valid_until_unix_seconds": 1791478709, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 739.0640625, + "stddev": 3.194833256007488, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 40.60954, + "stddev": 0.08235665121895089, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 1845.0, + "stddev": 327.10854467592253, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 43.60256302521008, + "stddev": 0.023270849185024416, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 10240.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 2913, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 4096, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.49153700428012315, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 1.694327731092437, + "aae_top1": 2.0, + "aae_top10": 1.8, + "aae_top100": 1.46, + "accuracy_runs": 1, + "are_all": 0.49153700428012315, + "are_top1": 0.0005611672278338945, + "are_top10": 0.003950663328809479, + "are_top100": 0.03129160657746158, + "l1_err": 1613.0, + "l2_err": 107.81001808737442, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.49153700428012315, + "relative_error_p99": 5.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w4096-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 4096, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886729, + "valid_until_unix_seconds": 1791478729, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 5492.366153846154, + "stddev": 110.32925778298996, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 46.86758, + "stddev": 0.2167893926141219, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 8647.0, + "stddev": 13.30413469565007, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 51.65478991596639, + "stddev": 0.3125781503156082, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 81920.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 20818, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 24576, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42-w32768-d5", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 32768, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788886750, + "valid_until_unix_seconds": 1791478750, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": { + "value": 37349.625, + "stddev": 337.66657026364135, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" + }, + "update_cpu_ns": { + "value": 48.96084, + "stddev": 0.2723536519857951, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "merge_cpu_ns": { + "value": 48184.4, + "stddev": 857.3592012686398, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "read_cpu_ns": { + "value": 55.503865546218485, + "stddev": 0.030379887382542214, + "samples": 5, + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" + }, + "retained_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 655360.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": { + "value": 164178, + "stddev": null, + "samples": 1, + "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" + }, + "disk_bytes": { + "value": 172032, + "stddev": null, + "samples": 1, + "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" + } + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + } + ] +} diff --git a/tools/empirical-bench/results-sweep/raw.json b/tools/empirical-bench/results-sweep/raw.json new file mode 100644 index 00000000..41ae3260 --- /dev/null +++ b/tools/empirical-bench/results-sweep/raw.json @@ -0,0 +1,4608 @@ +[ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 5440, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:51:48.103893862Z", + "insert_throughput_items_per_sec": { + "mean": 28590919.77709379, + "stddev": 1609158.8508598115, + "n": 5, + "samples": [ + 31412115.96724973, + 27333606.66940003, + 28108718.90297292, + 28045141.459693525, + 28055015.886152744 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7024, + "stddev": 0.03748066168039188, + "n": 5, + "samples": [ + 0.637, + 0.733, + 0.713, + 0.715, + 0.714 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.0004472135954999579, + "n": 5, + "samples": [ + 0.0, + 0.001, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7011882, + "stddev": 0.03700154713927518, + "n": 5, + "samples": [ + 0.636697, + 0.7317, + 0.711523, + 0.713136, + 0.712885 + ] + }, + "insert_rss_peak_kb": 11296, + "insert_heap_allocated_kb": 1051, + "query_timestamp": "2026-09-08T16:51:58.116123539Z", + "query_throughput_items_per_sec": { + "mean": 24473073.58858718, + "stddev": 169053.16090350362, + "n": 5, + "samples": [ + 24592381.28027937, + 24225979.94088861, + 24376569.241644938, + 24537468.714727387, + 24632968.765395604 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.042800000000000005, + "stddev": 0.0017888543819998294, + "n": 5, + "samples": [ + 0.042, + 0.042, + 0.042, + 0.042, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0408628, + "stddev": 0.0002832820149603565, + "n": 5, + "samples": [ + 0.040663, + 0.041278, + 0.041023, + 0.040754, + 0.040596 + ] + }, + "query_rss_peak_kb": 11296, + "query_heap_allocated_kb": 733, + "merge_timestamp": "2026-09-08T16:51:48.103904851Z", + "merge_folds_per_sec": { + "mean": 501608.7408443724, + "stddev": 158760.43356765856, + "n": 5, + "samples": [ + 255950.8574353724, + 467726.8475210477, + 510725.2298263534, + 673400.6734006734, + 600240.0960384153 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0034, + "stddev": 0.0008944271909999159, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0022308, + "stddev": 0.0009705532958060573, + "n": 5, + "samples": [ + 0.003907, + 0.002138, + 0.001958, + 0.001485, + 0.001666 + ] + }, + "merge_rss_peak_kb": 11296, + "merge_heap_allocated_kb": 637, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 9960000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:52:08.791194355Z", + "insert_throughput_items_per_sec": { + "mean": 921478.5810593877, + "stddev": 7690.019883726106, + "n": 5, + "samples": [ + 929058.0559088556, + 913257.1049804568, + 928536.7908329278, + 913737.1378362878, + 922803.8157384098 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 20.1178, + "stddev": 2.2658516500424297, + "n": 5, + "samples": [ + 17.571, + 21.876, + 21.541, + 21.89, + 17.711 + ] + }, + "sys_ms": { + "mean": 1.5894, + "stddev": 2.164989792123741, + "n": 5, + "samples": [ + 3.958, + 0.025, + 0.0, + 0.0, + 3.964 + ] + } + }, + "insert_wall_time_ms": { + "mean": 21.705459, + "stddev": 0.1813336608258377, + "n": 5, + "samples": [ + 21.52718, + 21.899638, + 21.539265, + 21.888133, + 21.673079 + ] + }, + "insert_rss_peak_kb": 282556, + "insert_heap_allocated_kb": 243573, + "query_timestamp": "2026-09-08T16:52:18.902251139Z", + "query_throughput_items_per_sec": { + "mean": 268207.4355130188, + "stddev": 12903.457164889896, + "n": 5, + "samples": [ + 281195.15815681074, + 256320.15001905744, + 278226.9597472364, + 252803.9113821169, + 272490.9982598725 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 3.6566, + "stddev": 0.3205811909641613, + "n": 5, + "samples": [ + 3.151, + 3.904, + 3.596, + 3.957, + 3.675 + ] + }, + "sys_ms": { + "mean": 0.0814, + "stddev": 0.18201593336848287, + "n": 5, + "samples": [ + 0.407, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.7354578, + "stddev": 0.1819224065520792, + "n": 5, + "samples": [ + 3.556249, + 3.901371, + 3.594188, + 3.955635, + 3.669846 + ] + }, + "query_rss_peak_kb": 282556, + "query_heap_allocated_kb": 175245, + "merge_timestamp": "2026-09-08T16:52:08.791206619Z", + "merge_folds_per_sec": { + "mean": 316.98194388143827, + "stddev": 7.827645548918142, + "n": 5, + "samples": [ + 305.61861486308896, + 322.0760247573399, + 320.3648571284865, + 324.5244418828649, + 312.3257807754112 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 1.596, + "stddev": 1.5730268592748184, + "n": 5, + "samples": [ + 0.0, + 0.0, + 1.694, + 3.083, + 3.203 + ] + }, + "sys_ms": { + "mean": 1.5618, + "stddev": 1.5978310924500123, + "n": 5, + "samples": [ + 3.274, + 3.106, + 1.429, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 3.1563134, + "stddev": 0.07895276971899076, + "n": 5, + "samples": [ + 3.272052, + 3.104857, + 3.121441, + 3.081432, + 3.201785 + ] + }, + "merge_rss_peak_kb": 282556, + "merge_heap_allocated_kb": 77909, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms", + "impl": "polars", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 262144, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:52:28.929676697Z", + "insert_throughput_items_per_sec": { + "mean": 571845728.2743416, + "stddev": 78709030.93591695, + "n": 5, + "samples": [ + 671817265.7037286, + 451803826.7784128, + 568084985.5138328, + 590005310.0477904, + 577517253.3279432 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.0366, + "stddev": 0.0051283525619832335, + "n": 5, + "samples": [ + 0.031, + 0.045, + 0.036, + 0.035, + 0.036 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.0355544, + "stddev": 0.005317104315320511, + "n": 5, + "samples": [ + 0.02977, + 0.044267, + 0.035206, + 0.033898, + 0.034631 + ] + }, + "insert_rss_peak_kb": 19476, + "insert_heap_allocated_kb": 3185, + "query_timestamp": "2026-09-08T16:52:38.943261347Z", + "query_throughput_items_per_sec": { + "mean": 19775757.807094183, + "stddev": 838476.1546876673, + "n": 5, + "samples": [ + 19481784.531463083, + 20583331.618055698, + 18481555.407703113, + 20382788.773159944, + 19949328.705089074 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0526, + "stddev": 0.0023021728866442675, + "n": 5, + "samples": [ + 0.053, + 0.05, + 0.056, + 0.051, + 0.053 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0506418, + "stddev": 0.0022074174276742508, + "n": 5, + "samples": [ + 0.05133, + 0.048583, + 0.054108, + 0.049061, + 0.050127 + ] + }, + "query_rss_peak_kb": 19492, + "query_heap_allocated_kb": 2053, + "merge_timestamp": null, + "merge_shards": null, + "merge_supported": null, + "merge_cpu_time_ms": null, + "merge_wall_time_ms": null, + "merge_rss_peak_kb": null, + "merge_heap_allocated_kb": null, + "prepare_timestamp": "2026-09-08T16:52:48.962964572Z", + "prepare_cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.862, + "stddev": 0.01598436736314578, + "n": 5, + "samples": [ + 0.842, + 0.863, + 0.872, + 0.851, + 0.882 + ] + } + }, + "prepare_wall_time_ms": { + "mean": 0.8168664, + "stddev": 0.009893839158789669, + "n": 5, + "samples": [ + 0.802512, + 0.822305, + 0.821603, + 0.811058, + 0.826854 + ] + }, + "prepare_rss_peak_kb": 18288, + "prepare_heap_allocated_kb": 1834 + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 54400, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:52:59.017545868Z", + "insert_throughput_items_per_sec": { + "mean": 24990558.51326956, + "stddev": 1579868.8793788734, + "n": 5, + "samples": [ + 27797854.005670764, + 24403338.376689933, + 24401790.115322854, + 23973686.48171767, + 24376123.586946588 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.8038, + "stddev": 0.04668725736215394, + "n": 5, + "samples": [ + 0.721, + 0.82, + 0.821, + 0.835, + 0.822 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8026749999999999, + "stddev": 0.04692298889670179, + "n": 5, + "samples": [ + 0.71948, + 0.81956, + 0.819612, + 0.834248, + 0.820475 + ] + }, + "insert_rss_peak_kb": 12856, + "insert_heap_allocated_kb": 2209, + "query_timestamp": "2026-09-08T16:53:09.029761284Z", + "query_throughput_items_per_sec": { + "mean": 8857763.573752059, + "stddev": 411812.6739818057, + "n": 5, + "samples": [ + 9182061.923825614, + 8637368.711995577, + 8233773.291286197, + 9116019.58121006, + 9119594.360442849 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.104, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.104, + "accuracy_runs": 1, + "are_all": 0.006335943223443224, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.006335943223443223, + "l1_err": 104.0, + "l2_err": 40.049968789001575, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.006335943223443224, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1148, + "stddev": 0.005310367218940701, + "n": 5, + "samples": [ + 0.11, + 0.117, + 0.123, + 0.111, + 0.113 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.1130972, + "stddev": 0.005429740481827841, + "n": 5, + "samples": [ + 0.108908, + 0.115776, + 0.121451, + 0.109697, + 0.109654 + ] + }, + "query_rss_peak_kb": 12928, + "query_heap_allocated_kb": 1561, + "merge_timestamp": "2026-09-08T16:52:59.017563648Z", + "merge_folds_per_sec": { + "mean": 6720.021553902316, + "stddev": 406.6799378841053, + "n": 5, + "samples": [ + 6730.879254757048, + 6086.390222822746, + 7137.4021283733155, + 6642.929266089175, + 7002.506897469295 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.1502, + "stddev": 0.009311283477587834, + "n": 5, + "samples": [ + 0.149, + 0.165, + 0.141, + 0.152, + 0.144 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.1492638, + "stddev": 0.009404371201733798, + "n": 5, + "samples": [ + 0.148569, + 0.164301, + 0.140107, + 0.150536, + 0.142806 + ] + }, + "merge_rss_peak_kb": 13056, + "merge_heap_allocated_kb": 965, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 544000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:53:19.095980355Z", + "insert_throughput_items_per_sec": { + "mean": 22728722.29657367, + "stddev": 1071124.792702381, + "n": 5, + "samples": [ + 24596766.755010057, + 22410018.17452474, + 22438177.212235987, + 22345669.632681884, + 21852979.70841569 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.3072, + "stddev": 0.4219066247405935, + "n": 5, + "samples": [ + 0.814, + 0.0, + 0.0, + 0.0, + 0.722 + ] + }, + "sys_ms": { + "mean": 0.5758000000000001, + "stddev": 0.4420369894024708, + "n": 5, + "samples": [ + 0.0, + 0.895, + 0.893, + 0.896, + 0.195 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8814292, + "stddev": 0.039409757049492185, + "n": 5, + "samples": [ + 0.813115, + 0.892458, + 0.891338, + 0.895028, + 0.915207 + ] + }, + "insert_rss_peak_kb": 26264, + "insert_heap_allocated_kb": 14082, + "query_timestamp": "2026-09-08T16:53:29.111049162Z", + "query_throughput_items_per_sec": { + "mean": 6364974.272871866, + "stddev": 52458.99915142277, + "n": 5, + "samples": [ + 6286421.9572146125, + 6373323.815836435, + 6416631.909910488, + 6405288.205942826, + 6343205.475454967 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1588, + "stddev": 0.0021679483388678815, + "n": 5, + "samples": [ + 0.16, + 0.158, + 0.157, + 0.157, + 0.162 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.0004472135954999579, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.001, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.15711840000000002, + "stddev": 0.001300415241374835, + "n": 5, + "samples": [ + 0.159073, + 0.156904, + 0.155845, + 0.156121, + 0.157649 + ] + }, + "query_rss_peak_kb": 26640, + "query_heap_allocated_kb": 10102, + "merge_timestamp": "2026-09-08T16:53:19.095992785Z", + "merge_folds_per_sec": { + "mean": 10635.03536783152, + "stddev": 87.92375862897931, + "n": 5, + "samples": [ + 10603.779186902211, + 10678.96883876893, + 10658.026559802189, + 10733.068584308254, + 10501.33366937601 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0954, + "stddev": 0.0011401754250991403, + "n": 5, + "samples": [ + 0.096, + 0.095, + 0.095, + 0.094, + 0.097 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.0004472135954999579, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.001 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.094034, + "stddev": 0.0007807483589480032, + "n": 5, + "samples": [ + 0.094306, + 0.093642, + 0.093826, + 0.09317, + 0.095226 + ] + }, + "merge_rss_peak_kb": 26640, + "merge_heap_allocated_kb": 4746, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 99600, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:53:39.490777022Z", + "insert_throughput_items_per_sec": { + "mean": 1311310.924690102, + "stddev": 5087.0670143445095, + "n": 5, + "samples": [ + 1319582.5790819242, + 1311256.8383683192, + 1305805.729797194, + 1309211.718387512, + 1310697.7578155596 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 15.2536, + "stddev": 0.05943315572977692, + "n": 5, + "samples": [ + 15.157, + 15.254, + 15.318, + 15.278, + 15.261 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 15.252096, + "stddev": 0.059000250152012115, + "n": 5, + "samples": [ + 15.156308, + 15.252542, + 15.316214, + 15.276368, + 15.259048 + ] + }, + "insert_rss_peak_kb": 14340, + "insert_heap_allocated_kb": 2912, + "query_timestamp": "2026-09-08T16:53:49.554573010Z", + "query_throughput_items_per_sec": { + "mean": 444296.29919579526, + "stddev": 11054.849402443224, + "n": 5, + "samples": [ + 463929.0522578963, + 441097.78652719746, + 437434.02948042896, + 439148.8943109139, + 439871.7334025398 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 7.446, + "aae_top1": 9.0, + "aae_top10": 8.2, + "aae_top100": 6.92, + "aae_top1000": 7.446, + "accuracy_runs": 1, + "are_all": 0.3932923866316825, + "are_top1": 0.2195121951219512, + "are_top10": 0.2434299417440008, + "are_top100": 0.2454991949546276, + "are_top1000": 0.3932923866316827, + "l1_err": 7446.0, + "l2_err": 312.3747749098829, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.3932923866316825, + "relative_error_p99": 1.3846153846153846 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 2.2533999999999996, + "stddev": 0.05490719442841725, + "n": 5, + "samples": [ + 2.156, + 2.268, + 2.288, + 2.278, + 2.277 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 2.2518308, + "stddev": 0.05428632633269639, + "n": 5, + "samples": [ + 2.155502, + 2.267071, + 2.286059, + 2.277132, + 2.27339 + ] + }, + "query_rss_peak_kb": 14348, + "query_heap_allocated_kb": 1953, + "merge_timestamp": "2026-09-08T16:53:39.490802709Z", + "merge_folds_per_sec": { + "mean": 3907.6092853175383, + "stddev": 45.84247420699244, + "n": 5, + "samples": [ + 3872.2918159112473, + 3878.5246092386456, + 3912.118177265899, + 3984.984578109683, + 3890.1272460622185 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.2572, + "stddev": 0.0024899799195977554, + "n": 5, + "samples": [ + 0.259, + 0.259, + 0.257, + 0.253, + 0.258 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.25593879999999997, + "stddev": 0.0029676058869061417, + "n": 5, + "samples": [ + 0.258245, + 0.25783, + 0.255616, + 0.250942, + 0.257061 + ] + }, + "merge_rss_peak_kb": 14412, + "merge_heap_allocated_kb": 912, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 996000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:54:00.033769345Z", + "insert_throughput_items_per_sec": { + "mean": 1223691.645571603, + "stddev": 1932.8434335010577, + "n": 5, + "samples": [ + 1224378.8022318466, + 1223986.9121527455, + 1220302.8620861296, + 1224944.9754717017, + 1224844.6759155912 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 16.3452, + "stddev": 0.025635912310663263, + "n": 5, + "samples": [ + 16.336, + 16.342, + 16.39, + 16.328, + 16.33 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 16.3440194, + "stddev": 0.025865292493997084, + "n": 5, + "samples": [ + 16.334814, + 16.340044, + 16.389374, + 16.327264, + 16.328601 + ] + }, + "insert_rss_peak_kb": 38508, + "insert_heap_allocated_kb": 24799, + "query_timestamp": "2026-09-08T16:54:10.097782268Z", + "query_throughput_items_per_sec": { + "mean": 480447.52494141465, + "stddev": 6635.975766405758, + "n": 5, + "samples": [ + 492185.8119564731, + 479018.73969211546, + 476288.00182894594, + 477599.6225052584, + 477145.4487242801 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 2.0836, + "stddev": 0.02868449058289177, + "n": 5, + "samples": [ + 2.033, + 2.089, + 2.101, + 2.095, + 2.1 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 2.081705, + "stddev": 0.02825815638890834, + "n": 5, + "samples": [ + 2.031753, + 2.087601, + 2.09957, + 2.093804, + 2.095797 + ] + }, + "query_rss_peak_kb": 38508, + "query_heap_allocated_kb": 17719, + "merge_timestamp": "2026-09-08T16:54:00.033779659Z", + "merge_folds_per_sec": { + "mean": 5698.175368215685, + "stddev": 101.28504249728957, + "n": 5, + "samples": [ + 5725.17991377879, + 5525.197663946427, + 5764.419695869217, + 5700.506775052302, + 5775.572792431689 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.177, + "stddev": 0.0029154759474226545, + "n": 5, + "samples": [ + 0.176, + 0.182, + 0.175, + 0.177, + 0.175 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.17553999999999997, + "stddev": 0.003180600257812981, + "n": 5, + "samples": [ + 0.174667, + 0.180989, + 0.173478, + 0.175423, + 0.173143 + ] + }, + "merge_rss_peak_kb": 38508, + "merge_heap_allocated_kb": 7918, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 5440, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:54:20.170278751Z", + "insert_throughput_items_per_sec": { + "mean": 28004908.130135383, + "stddev": 1999702.9441665332, + "n": 5, + "samples": [ + 31119298.94443338, + 27291310.17392752, + 27937487.07891223, + 25601343.55850995, + 28075100.89489384 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7186, + "stddev": 0.05001299831043926, + "n": 5, + "samples": [ + 0.644, + 0.735, + 0.717, + 0.783, + 0.714 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.716998, + "stddev": 0.04979563395017678, + "n": 5, + "samples": [ + 0.642688, + 0.732834, + 0.715884, + 0.781209, + 0.712375 + ] + }, + "insert_rss_peak_kb": 11528, + "insert_heap_allocated_kb": 1063, + "query_timestamp": "2026-09-08T16:54:30.184145503Z", + "query_throughput_items_per_sec": { + "mean": 24132674.06538065, + "stddev": 183561.08686353985, + "n": 5, + "samples": [ + 24090897.588379685, + 24063495.273242, + 24457289.6596018, + 24030694.66882068, + 24020993.1368591 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0414, + "stddev": 0.0020736441353327714, + "n": 5, + "samples": [ + 0.041, + 0.041, + 0.04, + 0.04, + 0.045 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0394504, + "stddev": 0.0002972108679035809, + "n": 5, + "samples": [ + 0.039517, + 0.039562, + 0.038925, + 0.039616, + 0.039632 + ] + }, + "query_rss_peak_kb": 11528, + "query_heap_allocated_kb": 745, + "merge_timestamp": "2026-09-08T16:54:20.170288822Z", + "merge_folds_per_sec": { + "mean": 577476.2673858211, + "stddev": 196325.0529098306, + "n": 5, + "samples": [ + 261711.59382360635, + 585823.0814294084, + 569476.0820045559, + 783085.3563038372, + 687285.2233676976 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.003, + "stddev": 0.001224744871391589, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.002, + 0.002 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0020031999999999997, + "stddev": 0.0010345444408047437, + "n": 5, + "samples": [ + 0.003821, + 0.001707, + 0.001756, + 0.001277, + 0.001455 + ] + }, + "merge_rss_peak_kb": 11528, + "merge_heap_allocated_kb": 649, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 9960000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:54:40.847913352Z", + "insert_throughput_items_per_sec": { + "mean": 1050781.7264742262, + "stddev": 7029.401743054476, + "n": 5, + "samples": [ + 1041376.2203302152, + 1046629.9822857876, + 1057773.5833529285, + 1050784.8522218214, + 1057343.9941803787 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 18.2376, + "stddev": 1.8377795841721607, + "n": 5, + "samples": [ + 19.207, + 19.111, + 14.956, + 18.997, + 18.917 + ] + }, + "sys_ms": { + "mean": 0.7981999999999999, + "stddev": 1.7636635733608608, + "n": 5, + "samples": [ + 0.0, + 0.0, + 3.953, + 0.038, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 19.034131, + "stddev": 0.1275074702007703, + "n": 5, + "samples": [ + 19.205355, + 19.10895, + 18.907638, + 19.033392, + 18.91532 + ] + }, + "insert_rss_peak_kb": 282980, + "insert_heap_allocated_kb": 243573, + "query_timestamp": "2026-09-08T16:54:50.944031928Z", + "query_throughput_items_per_sec": { + "mean": 263992.41077985184, + "stddev": 11719.462220063848, + "n": 5, + "samples": [ + 265786.88972663874, + 251365.81145082167, + 274980.71235602145, + 252382.25519451455, + 275446.38517126284 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 2.1672, + "stddev": 1.981787501222066, + "n": 5, + "samples": [ + 3.583, + 3.789, + 3.464, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 1.4468, + "stddev": 1.9842205522572331, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 3.774, + 3.46 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.6118902, + "stddev": 0.1612567617270668, + "n": 5, + "samples": [ + 3.581817, + 3.787309, + 3.462061, + 3.772056, + 3.456208 + ] + }, + "query_rss_peak_kb": 282980, + "query_heap_allocated_kb": 175234, + "merge_timestamp": "2026-09-08T16:54:40.847925832Z", + "merge_folds_per_sec": { + "mean": 318.78412184328727, + "stddev": 17.2014878463438, + "n": 5, + "samples": [ + 298.7186166221377, + 305.97021318780577, + 320.0282648963556, + 327.0254484663488, + 342.17806604378853 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 1.5812, + "stddev": 1.5759705581006265, + "n": 5, + "samples": [ + 3.35, + 0.0, + 0.0, + 1.632, + 2.924 + ] + }, + "sys_ms": { + "mean": 1.5648, + "stddev": 1.6016370375337854, + "n": 5, + "samples": [ + 0.0, + 3.27, + 3.126, + 1.428, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 3.1441938, + "stddev": 0.1686617339920351, + "n": 5, + "samples": [ + 3.347632, + 3.268292, + 3.124724, + 3.057866, + 2.922455 + ] + }, + "merge_rss_peak_kb": 282980, + "merge_heap_allocated_kb": 77909, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms", + "impl": "polars", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 262144, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:55:01.014077118Z", + "insert_throughput_items_per_sec": { + "mean": 570786343.5171742, + "stddev": 94251486.59796187, + "n": 5, + "samples": [ + 683971136.4180431, + 422038869.7799067, + 577934462.231983, + 593418983.4732814, + 576568265.6826569 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.0372, + "stddev": 0.007049822692805827, + "n": 5, + "samples": [ + 0.03, + 0.049, + 0.036, + 0.035, + 0.036 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.0359254, + "stddev": 0.006787974020280279, + "n": 5, + "samples": [ + 0.029241, + 0.047389, + 0.034606, + 0.033703, + 0.034688 + ] + }, + "insert_rss_peak_kb": 19564, + "insert_heap_allocated_kb": 3289, + "query_timestamp": "2026-09-08T16:55:11.029581719Z", + "query_throughput_items_per_sec": { + "mean": 18929845.303032693, + "stddev": 882427.9371693508, + "n": 5, + "samples": [ + 19540630.9653318, + 17718220.73329611, + 18347562.97338447, + 19863956.933605976, + 19178854.909545105 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.052000000000000005, + "stddev": 0.0024494897427831757, + "n": 5, + "samples": [ + 0.05, + 0.055, + 0.053, + 0.049, + 0.053 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.05038, + "stddev": 0.00238878368631402, + "n": 5, + "samples": [ + 0.048719, + 0.05373, + 0.051887, + 0.047926, + 0.049638 + ] + }, + "query_rss_peak_kb": 19600, + "query_heap_allocated_kb": 2157, + "merge_timestamp": null, + "merge_shards": null, + "merge_supported": null, + "merge_cpu_time_ms": null, + "merge_wall_time_ms": null, + "merge_rss_peak_kb": null, + "merge_heap_allocated_kb": null, + "prepare_timestamp": "2026-09-08T16:55:21.049786514Z", + "prepare_cpu_time_ms": { + "user_ms": { + "mean": 0.562, + "stddev": 0.31469667935966533, + "n": 5, + "samples": [ + 0.731, + 0.705, + 0.683, + 0.691, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.13979999999999998, + "stddev": 0.3126023032544706, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.699 + ] + } + }, + "prepare_wall_time_ms": { + "mean": 0.6622604000000001, + "stddev": 0.019096538450724513, + "n": 5, + "samples": [ + 0.693298, + 0.664156, + 0.643068, + 0.65158, + 0.6592 + ] + }, + "prepare_rss_peak_kb": 18944, + "prepare_heap_allocated_kb": 1860 + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 54400, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:55:31.140036354Z", + "insert_throughput_items_per_sec": { + "mean": 25174661.53374953, + "stddev": 1485342.7616920352, + "n": 5, + "samples": [ + 27825041.702781253, + 24510705.05043078, + 24536324.8020532, + 24353179.551122196, + 24648056.562360197 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7978, + "stddev": 0.043665776072342975, + "n": 5, + "samples": [ + 0.72, + 0.817, + 0.817, + 0.823, + 0.812 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7965072, + "stddev": 0.043593963821841254, + "n": 5, + "samples": [ + 0.718777, + 0.81597, + 0.815118, + 0.821248, + 0.811423 + ] + }, + "insert_rss_peak_kb": 13252, + "insert_heap_allocated_kb": 2221, + "query_timestamp": "2026-09-08T16:55:41.154366854Z", + "query_throughput_items_per_sec": { + "mean": 8576316.818916982, + "stddev": 681813.9449329216, + "n": 5, + "samples": [ + 9665563.38457165, + 8630067.445064908, + 8038503.757493878, + 8588182.228236355, + 7959267.279218119 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.015756302521008403, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.05, + "accuracy_runs": 1, + "are_all": 0.007412989350329503, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0008494363929146537, + "l1_err": 15.0, + "l2_err": 6.557438524302, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.007412989350329503, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1134, + "stddev": 0.008933084573650905, + "n": 5, + "samples": [ + 0.1, + 0.112, + 0.12, + 0.112, + 0.123 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.111539, + "stddev": 0.008437461940654901, + "n": 5, + "samples": [ + 0.098494, + 0.110312, + 0.11843, + 0.11085, + 0.119609 + ] + }, + "query_rss_peak_kb": 13260, + "query_heap_allocated_kb": 1573, + "merge_timestamp": "2026-09-08T16:55:31.140052236Z", + "merge_folds_per_sec": { + "mean": 6676.309784024607, + "stddev": 217.58730442549117, + "n": 5, + "samples": [ + 6371.699459679886, + 6727.483114017384, + 6863.794854899376, + 6540.992399366833, + 6877.579092159559 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.15159999999999998, + "stddev": 0.00527257053058563, + "n": 5, + "samples": [ + 0.159, + 0.15, + 0.147, + 0.155, + 0.147 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.1499124, + "stddev": 0.004950865863664654, + "n": 5, + "samples": [ + 0.156944, + 0.148644, + 0.145692, + 0.152882, + 0.1454 + ] + }, + "merge_rss_peak_kb": 13324, + "merge_heap_allocated_kb": 977, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 544000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:55:51.219418192Z", + "insert_throughput_items_per_sec": { + "mean": 23219202.465134893, + "stddev": 942870.5108129232, + "n": 5, + "samples": [ + 24883637.888324723, + 22855627.85552501, + 22938515.60277831, + 22873925.783260405, + 22544305.195786014 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.2978, + "stddev": 0.4099441425365168, + "n": 5, + "samples": [ + 0.804, + 0.0, + 0.0, + 0.0, + 0.685 + ] + }, + "sys_ms": { + "mean": 0.5658000000000001, + "stddev": 0.4293724490462797, + "n": 5, + "samples": [ + 0.001, + 0.876, + 0.873, + 0.876, + 0.203 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8624390000000001, + "stddev": 0.0333407782752592, + "n": 5, + "samples": [ + 0.803741, + 0.875058, + 0.871896, + 0.874358, + 0.887142 + ] + }, + "insert_rss_peak_kb": 26588, + "insert_heap_allocated_kb": 14094, + "query_timestamp": "2026-09-08T16:56:01.235904631Z", + "query_throughput_items_per_sec": { + "mean": 6238332.937434685, + "stddev": 46974.9745428271, + "n": 5, + "samples": [ + 6177526.0046591, + 6232609.9053978855, + 6211382.750363744, + 6285695.42108217, + 6284450.6056705285 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1544, + "stddev": 0.0015165750888103107, + "n": 5, + "samples": [ + 0.155, + 0.154, + 0.155, + 0.152, + 0.156 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.15261180000000002, + "stddev": 0.0011500561725411582, + "n": 5, + "samples": [ + 0.154107, + 0.152745, + 0.153267, + 0.151455, + 0.151485 + ] + }, + "query_rss_peak_kb": 26588, + "query_heap_allocated_kb": 10114, + "merge_timestamp": "2026-09-08T16:55:51.219429398Z", + "merge_folds_per_sec": { + "mean": 10621.917451774543, + "stddev": 112.10824444149308, + "n": 5, + "samples": [ + 10625.750443625082, + 10687.528722733445, + 10746.101851553349, + 10448.338191810592, + 10601.86804915026 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0954, + "stddev": 0.0011401754250991388, + "n": 5, + "samples": [ + 0.096, + 0.095, + 0.094, + 0.097, + 0.095 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0941534, + "stddev": 0.0009995512993338585, + "n": 5, + "samples": [ + 0.094111, + 0.093567, + 0.093057, + 0.095709, + 0.094323 + ] + }, + "merge_rss_peak_kb": 26588, + "merge_heap_allocated_kb": 4758, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 99600, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:56:11.885475152Z", + "insert_throughput_items_per_sec": { + "mean": 983985.5692719496, + "stddev": 48347.35884312693, + "n": 5, + "samples": [ + 1015734.489036035, + 1009347.0074955624, + 1004471.4549050828, + 898989.9802622255, + 991384.9146608432 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 20.3662, + "stddev": 1.07141387894688, + "n": 5, + "samples": [ + 19.66, + 19.822, + 19.917, + 22.253, + 20.179 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 20.3673866, + "stddev": 1.0657642975455686, + "n": 5, + "samples": [ + 19.690185, + 19.814791, + 19.910969, + 22.247189, + 20.173799 + ] + }, + "insert_rss_peak_kb": 14540, + "insert_heap_allocated_kb": 2921, + "query_timestamp": "2026-09-08T16:56:21.951503596Z", + "query_throughput_items_per_sec": { + "mean": 297007.43855232355, + "stddev": 18479.763243343983, + "n": 5, + "samples": [ + 328955.5522997863, + 297134.15357341274, + 285265.7541159024, + 287442.1303809725, + 286239.6023915439 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 2.2815126050420167, + "aae_top1": 1.0, + "aae_top10": 0.8, + "aae_top100": 2.01, + "accuracy_runs": 1, + "are_all": 0.6369033391351014, + "are_top1": 0.0002805836139169473, + "are_top10": 0.001555601294898813, + "are_top100": 0.04553785988253641, + "l1_err": 2172.0, + "l2_err": 102.52804494381036, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.6369033391351014, + "relative_error_p99": 4.5 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 3.2204, + "stddev": 0.1875467941608172, + "n": 5, + "samples": [ + 2.899, + 3.209, + 3.343, + 3.317, + 3.334 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.2146085999999996, + "stddev": 0.1869482902310156, + "n": 5, + "samples": [ + 2.894008, + 3.20394, + 3.337239, + 3.311971, + 3.325885 + ] + }, + "query_rss_peak_kb": 14608, + "query_heap_allocated_kb": 1943, + "merge_timestamp": "2026-09-08T16:56:11.885502786Z", + "merge_folds_per_sec": { + "mean": 3157.4718914817513, + "stddev": 118.41487861947662, + "n": 5, + "samples": [ + 3239.7583140297734, + 3137.1072733832134, + 3150.648245876589, + 2976.0753304187633, + 3283.770293700415 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.3194, + "stddev": 0.011970797801316343, + "n": 5, + "samples": [ + 0.311, + 0.321, + 0.32, + 0.338, + 0.307 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.31707320000000005, + "stddev": 0.012142504239241588, + "n": 5, + "samples": [ + 0.308665, + 0.318765, + 0.317395, + 0.336013, + 0.304528 + ] + }, + "merge_rss_peak_kb": 14672, + "merge_heap_allocated_kb": 897, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 996000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:56:32.542482687Z", + "insert_throughput_items_per_sec": { + "mean": 1216934.8677931523, + "stddev": 17588.6736754695, + "n": 5, + "samples": [ + 1230601.5660389408, + 1192526.9108604025, + 1223835.1689841005, + 1204714.4814631788, + 1232996.21161914 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 15.669, + "stddev": 1.7911845242743694, + "n": 5, + "samples": [ + 16.255, + 16.772, + 12.492, + 16.604, + 16.222 + ] + }, + "sys_ms": { + "mean": 0.7711999999999999, + "stddev": 1.722778627682617, + "n": 5, + "samples": [ + 0.0, + 0.001, + 3.853, + 0.001, + 0.001 + ] + } + }, + "insert_wall_time_ms": { + "mean": 16.4374976, + "stddev": 0.2390789495141724, + "n": 5, + "samples": [ + 16.252214, + 16.77111, + 16.34207, + 16.601444, + 16.22065 + ] + }, + "insert_rss_peak_kb": 39244, + "insert_heap_allocated_kb": 24773, + "query_timestamp": "2026-09-08T16:56:42.616696562Z", + "query_throughput_items_per_sec": { + "mean": 316743.3788686749, + "stddev": 19624.004920500334, + "n": 5, + "samples": [ + 338155.9630713797, + 319552.5190607036, + 320086.71929268906, + 284482.18415380444, + 321439.5087647978 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 1.6515999999999995, + "stddev": 1.5933541037697805, + "n": 5, + "samples": [ + 0.0, + 1.938, + 2.977, + 3.343, + 0.0 + ] + }, + "sys_ms": { + "mean": 1.3668, + "stddev": 1.4575073584719906, + "n": 5, + "samples": [ + 2.818, + 1.043, + 0.0, + 0.005, + 2.968 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.0153474, + "stddev": 0.19718704585316957, + "n": 5, + "samples": [ + 2.815269, + 2.979166, + 2.974194, + 3.346431, + 2.961677 + ] + }, + "query_rss_peak_kb": 39316, + "query_heap_allocated_kb": 17699, + "merge_timestamp": "2026-09-08T16:56:32.542496954Z", + "merge_folds_per_sec": { + "mean": 378.6009481680373, + "stddev": 29.455851150626135, + "n": 5, + "samples": [ + 341.649772085437, + 396.486180870652, + 403.8883135724244, + 399.2232712035464, + 351.75720310812665 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.5328, + "stddev": 1.1057032603732342, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.157, + 2.507, + 0.0 + ] + }, + "sys_ms": { + "mean": 2.124, + "stddev": 1.2123172027155271, + "n": 5, + "samples": [ + 2.929, + 2.525, + 2.321, + 0.0, + 2.845 + ] + } + }, + "merge_wall_time_ms": { + "mean": 2.6545592, + "stddev": 0.21302448069928503, + "n": 5, + "samples": [ + 2.926974, + 2.522156, + 2.475932, + 2.504864, + 2.84287 + ] + }, + "merge_rss_peak_kb": 39380, + "merge_heap_allocated_kb": 7878, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 10240, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:57:29.368430923Z", + "insert_throughput_items_per_sec": { + "mean": 27980993.616275582, + "stddev": 1842098.5039640688, + "n": 5, + "samples": [ + 31242287.060381968, + 26710436.168067407, + 27310987.48337444, + 27351325.03494132, + 27289932.33461278 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7182, + "stddev": 0.04386000455996331, + "n": 5, + "samples": [ + 0.641, + 0.751, + 0.733, + 0.732, + 0.734 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7170664, + "stddev": 0.043596469791715914, + "n": 5, + "samples": [ + 0.640158, + 0.748771, + 0.732306, + 0.731226, + 0.732871 + ] + }, + "insert_rss_peak_kb": 11284, + "insert_heap_allocated_kb": 1111, + "query_timestamp": "2026-09-08T16:57:39.378928498Z", + "query_throughput_items_per_sec": { + "mean": 23618370.59076393, + "stddev": 534531.4768930095, + "n": 5, + "samples": [ + 23597706.302947354, + 22864459.48417779, + 24091741.351064853, + 23378687.98803011, + 24159257.827599537 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 9.229, + "aae_top1": 0.0, + "aae_top10": 5.7, + "aae_top100": 9.32, + "aae_top1000": 9.229, + "accuracy_runs": 1, + "are_all": 0.4857875000848293, + "are_top1": 0.0, + "are_top10": 0.17943548387096775, + "are_top100": 0.3330711319229116, + "are_top1000": 0.485787500084829, + "l1_err": 9229.0, + "l2_err": 467.7210707248499, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.4857875000848293, + "relative_error_p99": 2.3684210526315788 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.044399999999999995, + "stddev": 0.0011401754250991397, + "n": 5, + "samples": [ + 0.044, + 0.045, + 0.043, + 0.044, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0423574, + "stddev": 0.0009653956701788112, + "n": 5, + "samples": [ + 0.042377, + 0.043736, + 0.041508, + 0.042774, + 0.041392 + ] + }, + "query_rss_peak_kb": 11284, + "query_heap_allocated_kb": 793, + "merge_timestamp": "2026-09-08T16:57:29.368440582Z", + "merge_folds_per_sec": { + "mean": 407058.8305226917, + "stddev": 144887.41174209333, + "n": 5, + "samples": [ + 154607.29746444031, + 520833.3333333334, + 471475.71900047146, + 458085.2038479157, + 430292.59896729776 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.004, + "stddev": 0.0017320508075688774, + "n": 5, + "samples": [ + 0.007, + 0.003, + 0.004, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0030032, + "stddev": 0.0019423232738141195, + "n": 5, + "samples": [ + 0.006468, + 0.00192, + 0.002121, + 0.002183, + 0.002324 + ] + }, + "merge_rss_peak_kb": 11284, + "merge_heap_allocated_kb": 657, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 81920, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:57:49.454214745Z", + "insert_throughput_items_per_sec": { + "mean": 23866037.558692742, + "stddev": 1486734.5852393098, + "n": 5, + "samples": [ + 26506812.913589116, + 23146380.02189647, + 22952072.62953863, + 23301604.315457117, + 23423317.912982374 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.8417999999999999, + "stddev": 0.04838594837346897, + "n": 5, + "samples": [ + 0.756, + 0.866, + 0.872, + 0.86, + 0.855 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.840426, + "stddev": 0.04846758779328715, + "n": 5, + "samples": [ + 0.754523, + 0.864066, + 0.871381, + 0.85831, + 0.85385 + ] + }, + "insert_rss_peak_kb": 13852, + "insert_heap_allocated_kb": 2809, + "query_timestamp": "2026-09-08T16:57:59.464130508Z", + "query_throughput_items_per_sec": { + "mean": 6333722.406897154, + "stddev": 679420.7403474726, + "n": 5, + "samples": [ + 6643900.235194068, + 6530399.007379351, + 5123817.038741181, + 6668711.738266402, + 6701784.014904767 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1614, + "stddev": 0.01993238570768688, + "n": 5, + "samples": [ + 0.152, + 0.154, + 0.197, + 0.151, + 0.153 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.1595958, + "stddev": 0.019939546188416625, + "n": 5, + "samples": [ + 0.150514, + 0.15313, + 0.195167, + 0.149954, + 0.149214 + ] + }, + "query_rss_peak_kb": 13860, + "query_heap_allocated_kb": 1993, + "merge_timestamp": "2026-09-08T16:57:49.454232591Z", + "merge_folds_per_sec": { + "mean": 4539.646927302015, + "stddev": 485.3692799128041, + "n": 5, + "samples": [ + 3672.460585316768, + 4730.279464910787, + 4772.244625259491, + 4787.414843858464, + 4735.835117164561 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.224, + "stddev": 0.027973201461398728, + "n": 5, + "samples": [ + 0.274, + 0.213, + 0.211, + 0.21, + 0.212 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.2226566, + "stddev": 0.027770196835816635, + "n": 5, + "samples": [ + 0.272297, + 0.211404, + 0.209545, + 0.208881, + 0.211156 + ] + }, + "merge_rss_peak_kb": 13924, + "merge_heap_allocated_kb": 1130, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 655360, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:58:09.535935967Z", + "insert_throughput_items_per_sec": { + "mean": 22514485.921863537, + "stddev": 998470.0989676868, + "n": 5, + "samples": [ + 24191724.253050275, + 22348616.061950363, + 22309750.811238315, + 22215829.00032102, + 21506509.48275769 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.8907999999999999, + "stddev": 0.038596631977414905, + "n": 5, + "samples": [ + 0.827, + 0.896, + 0.897, + 0.902, + 0.932 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.0004472135954999579, + "n": 5, + "samples": [ + 0.001, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8896636000000001, + "stddev": 0.03798005779089853, + "n": 5, + "samples": [ + 0.826729, + 0.89491, + 0.896469, + 0.900259, + 0.929951 + ] + }, + "insert_rss_peak_kb": 29312, + "insert_heap_allocated_kb": 16782, + "query_timestamp": "2026-09-08T16:58:19.550894769Z", + "query_throughput_items_per_sec": { + "mean": 6299878.957075936, + "stddev": 82005.50949390283, + "n": 5, + "samples": [ + 6260760.682422915, + 6262721.1523406925, + 6443132.908945646, + 6241651.790729899, + 6291128.250940524 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1604, + "stddev": 0.0026076809620810583, + "n": 5, + "samples": [ + 0.161, + 0.161, + 0.156, + 0.161, + 0.163 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.1587544, + "stddev": 0.0020350172726539663, + "n": 5, + "samples": [ + 0.159725, + 0.159675, + 0.155204, + 0.160214, + 0.158954 + ] + }, + "query_rss_peak_kb": 29312, + "query_heap_allocated_kb": 12046, + "merge_timestamp": "2026-09-08T16:58:09.535948594Z", + "merge_folds_per_sec": { + "mean": 8993.467868920761, + "stddev": 243.54759379354093, + "n": 5, + "samples": [ + 8789.199831247362, + 8936.869950668477, + 8950.78856447253, + 8876.501238271923, + 9413.979759943515 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.113, + "stddev": 0.003000000000000003, + "n": 5, + "samples": [ + 0.116, + 0.114, + 0.113, + 0.114, + 0.108 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.1112552, + "stddev": 0.0029262140557382308, + "n": 5, + "samples": [ + 0.113776, + 0.111896, + 0.111722, + 0.112657, + 0.106225 + ] + }, + "merge_rss_peak_kb": 29312, + "merge_heap_allocated_kb": 5610, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 10240, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:58:29.666549460Z", + "insert_throughput_items_per_sec": { + "mean": 27922645.889863245, + "stddev": 1888179.5330403177, + "n": 5, + "samples": [ + 31277807.926109307, + 26874857.227320977, + 27302934.246343456, + 26857714.54278098, + 27299915.506761502 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7198, + "stddev": 0.04497999555357912, + "n": 5, + "samples": [ + 0.64, + 0.745, + 0.734, + 0.746, + 0.734 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7186822, + "stddev": 0.04469853239984509, + "n": 5, + "samples": [ + 0.639431, + 0.74419, + 0.732522, + 0.744665, + 0.732603 + ] + }, + "insert_rss_peak_kb": 11480, + "insert_heap_allocated_kb": 1123, + "query_timestamp": "2026-09-08T16:58:39.680354299Z", + "query_throughput_items_per_sec": { + "mean": 23507935.060018077, + "stddev": 132860.1428471702, + "n": 5, + "samples": [ + 23491092.1383803, + 23589464.033501003, + 23467350.309364755, + 23320187.149401072, + 23671581.669443272 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 1.694327731092437, + "aae_top1": 2.0, + "aae_top10": 1.8, + "aae_top100": 1.46, + "accuracy_runs": 1, + "are_all": 0.49153700428012315, + "are_top1": 0.0005611672278338945, + "are_top10": 0.003950663328809479, + "are_top100": 0.03129160657746158, + "l1_err": 1613.0, + "l2_err": 107.81001808737442, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.49153700428012315, + "relative_error_p99": 5.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0426, + "stddev": 0.001949358868961792, + "n": 5, + "samples": [ + 0.042, + 0.041, + 0.042, + 0.042, + 0.046 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.040498, + "stddev": 0.0002291353311909791, + "n": 5, + "samples": [ + 0.040526, + 0.040357, + 0.040567, + 0.040823, + 0.040217 + ] + }, + "query_rss_peak_kb": 11480, + "query_heap_allocated_kb": 805, + "merge_timestamp": "2026-09-08T16:58:29.666559855Z", + "merge_folds_per_sec": { + "mean": 435232.7310234324, + "stddev": 145910.6673992023, + "n": 5, + "samples": [ + 186811.13394358303, + 492368.29148202855, + 443066.0168365086, + 486381.3229571985, + 567536.8898978434 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0038, + "stddev": 0.0017888543819998318, + "n": 5, + "samples": [ + 0.007, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0026918000000000003, + "stddev": 0.00149803728258011, + "n": 5, + "samples": [ + 0.005353, + 0.002031, + 0.002257, + 0.002056, + 0.001762 + ] + }, + "merge_rss_peak_kb": 11480, + "merge_heap_allocated_kb": 669, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 81920, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:58:49.798211378Z", + "insert_throughput_items_per_sec": { + "mean": 23618218.139705643, + "stddev": 2653535.3827046547, + "n": 5, + "samples": [ + 27086287.431556337, + 23809353.74271136, + 23730872.91642936, + 23850637.766053863, + 19613938.8417773 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.4244, + "stddev": 0.4777324565067774, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.263, + 0.839, + 1.02 + ] + }, + "sys_ms": { + "mean": 0.4326, + "stddev": 0.4048361396911101, + "n": 5, + "samples": [ + 0.74, + 0.841, + 0.58, + 0.001, + 0.001 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8558812, + "stddev": 0.10168724905168784, + "n": 5, + "samples": [ + 0.738381, + 0.840006, + 0.842784, + 0.838552, + 1.019683 + ] + }, + "insert_rss_peak_kb": 14200, + "insert_heap_allocated_kb": 2821, + "query_timestamp": "2026-09-08T16:58:59.812679275Z", + "query_throughput_items_per_sec": { + "mean": 6740846.250834807, + "stddev": 136710.9851419851, + "n": 5, + "samples": [ + 6636366.171262861, + 6566921.203843581, + 6801846.215401323, + 6905406.091554659, + 6793691.57211161 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.1432, + "stddev": 0.0027748873851023087, + "n": 5, + "samples": [ + 0.145, + 0.146, + 0.142, + 0.139, + 0.144 + ] + }, + "sys_ms": { + "mean": 0.0002, + "stddev": 0.000447213595499958, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.001, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.14127520000000002, + "stddev": 0.0028749653389214904, + "n": 5, + "samples": [ + 0.143452, + 0.144969, + 0.139962, + 0.137863, + 0.14013 + ] + }, + "query_rss_peak_kb": 14208, + "query_heap_allocated_kb": 2005, + "merge_timestamp": "2026-09-08T16:58:49.798228851Z", + "merge_folds_per_sec": { + "mean": 4899.904983840585, + "stddev": 131.23951331790553, + "n": 5, + "samples": [ + 4687.419434978461, + 4891.07574319896, + 4919.613515162249, + 4962.261997508945, + 5039.154228354313 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.2056, + "stddev": 0.00568330889535312, + "n": 5, + "samples": [ + 0.215, + 0.206, + 0.204, + 0.203, + 0.2 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.20420520000000003, + "stddev": 0.005583532278047665, + "n": 5, + "samples": [ + 0.213337, + 0.204454, + 0.203268, + 0.201521, + 0.198446 + ] + }, + "merge_rss_peak_kb": 14272, + "merge_heap_allocated_kb": 1142, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 655360, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:59:10.266196678Z", + "insert_throughput_items_per_sec": { + "mean": 22930949.22290827, + "stddev": 1086404.7906464343, + "n": 5, + "samples": [ + 24777989.216619093, + 22519530.062446658, + 22801325.21302138, + 22645824.959095977, + 21910076.663358245 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.33940000000000003, + "stddev": 0.4656240973145613, + "n": 5, + "samples": [ + 0.808, + 0.889, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.5356000000000001, + "stddev": 0.4886637903507891, + "n": 5, + "samples": [ + 0.0, + 0.001, + 0.878, + 0.885, + 0.914 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.8736829999999999, + "stddev": 0.039580136356511024, + "n": 5, + "samples": [ + 0.807168, + 0.888118, + 0.877142, + 0.883165, + 0.912822 + ] + }, + "insert_rss_peak_kb": 29444, + "insert_heap_allocated_kb": 16794, + "query_timestamp": "2026-09-08T16:59:20.286100386Z", + "query_throughput_items_per_sec": { + "mean": 6524202.751988709, + "stddev": 98217.2134102652, + "n": 5, + "samples": [ + 6482629.00567911, + 6498337.872613465, + 6659624.62662031, + 6578356.378310773, + 6402065.876719884 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0304, + "stddev": 0.06797646651599361, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.152 + ] + }, + "sys_ms": { + "mean": 0.1172, + "stddev": 0.0655377753665777, + "n": 5, + "samples": [ + 0.148, + 0.148, + 0.144, + 0.146, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.1459446, + "stddev": 0.0021912476582988012, + "n": 5, + "samples": [ + 0.146854, + 0.146499, + 0.142951, + 0.144717, + 0.148702 + ] + }, + "query_rss_peak_kb": 29444, + "query_heap_allocated_kb": 12058, + "merge_timestamp": "2026-09-08T16:59:10.266215474Z", + "merge_folds_per_sec": { + "mean": 9372.60625346414, + "stddev": 306.91178929148936, + "n": 5, + "samples": [ + 9230.116022558404, + 9324.35708557895, + 9238.216654656986, + 9158.851113716297, + 9911.490390810066 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.1084, + "stddev": 0.0030495901363953833, + "n": 5, + "samples": [ + 0.11, + 0.109, + 0.11, + 0.11, + 0.103 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.106782, + "stddev": 0.003362997100801607, + "n": 5, + "samples": [ + 0.108341, + 0.107246, + 0.108246, + 0.109184, + 0.100893 + ] + }, + "merge_rss_peak_kb": 29444, + "merge_heap_allocated_kb": 5622, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + } +] diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json b/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json new file mode 100644 index 00000000..12a2a5de --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json @@ -0,0 +1,428 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": null, + "resources": { + "cpu_ns": 25873330.06, + "disk_bytes_per_state": 2498560.0, + "objective_cost": 25873330.06, + "peak_bytes_upper_bound": 9960000.0, + "retained_byte_seconds": 2988000000.0, + "retained_bytes": 9960000.0, + "serialized_bytes_per_state": 2490679.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 740414.2898437502, + "disk_bytes_per_state": 16384.0, + "objective_cost": 740414.2898437502, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13781.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 1008728.6131034482, + "disk_bytes_per_state": 143360.0, + "objective_cost": 1008728.6131034482, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136183.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": null, + "resources": { + "cpu_ns": 17058891.0175, + "disk_bytes_per_state": 258048.0, + "objective_cost": 17058891.0175, + "peak_bytes_upper_bound": 996000.0, + "retained_byte_seconds": 298800000.0, + "retained_bytes": 996000.0, + "serialized_bytes_per_state": 251754.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 742555.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 932753.6483333334, + "disk_bytes_per_state": 172032.0, + "objective_cost": 932753.6483333334, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164023.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + } + ], + "checked_formal_minimums": false, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json b/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json new file mode 100644 index 00000000..cb0d2105 --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json @@ -0,0 +1,428 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": null, + "resources": { + "cpu_ns": 25873330.06, + "disk_bytes_per_state": 2498560.0, + "objective_cost": 25873330.06, + "peak_bytes_upper_bound": 9960000.0, + "retained_byte_seconds": 2988000000.0, + "retained_bytes": 9960000.0, + "serialized_bytes_per_state": 2490679.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 740414.2898437502, + "disk_bytes_per_state": 16384.0, + "objective_cost": 740414.2898437502, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13781.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 1008728.6131034482, + "disk_bytes_per_state": 143360.0, + "objective_cost": 1008728.6131034482, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136183.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": null, + "resources": { + "cpu_ns": 17058891.0175, + "disk_bytes_per_state": 258048.0, + "objective_cost": 17058891.0175, + "peak_bytes_upper_bound": 996000.0, + "retained_byte_seconds": 298800000.0, + "retained_bytes": 996000.0, + "serialized_bytes_per_state": 251754.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 742555.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 932753.6483333334, + "disk_bytes_per_state": 172032.0, + "objective_cost": 932753.6483333334, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164023.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + } + ], + "checked_formal_minimums": false, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 703276.2264355469, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.05, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json new file mode 100644 index 00000000..0680fd97 --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json @@ -0,0 +1,430 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 740414.2898437502, + "disk_bytes_per_state": 16384.0, + "objective_cost": 903614.2898437502, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13781.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 1008728.6131034482, + "disk_bytes_per_state": 143360.0, + "objective_cost": 2640728.6131034484, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136183.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 742555.74, + "disk_bytes_per_state": 24576.0, + "objective_cost": 988315.74, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20661.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 932753.6483333334, + "disk_bytes_per_state": 172032.0, + "objective_cost": 2898833.6483333334, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164023.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": -37138.06340820331, + "estimated_retained_bytes_savings": 242576.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-uniform-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 703276.2264355469, + "disk_bytes_per_state": null, + "objective_cost": 1594204.2264355468, + "peak_bytes_upper_bound": 628344.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 740414.2898437502, + "disk_bytes_per_state": 16384.0, + "objective_cost": 903614.2898437502, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13781.0 + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + } + ], + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json b/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json new file mode 100644 index 00000000..251f43ad --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json @@ -0,0 +1,428 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": null, + "resources": { + "cpu_ns": 23616342.411764707, + "disk_bytes_per_state": 2502656.0, + "objective_cost": 23616342.411764707, + "peak_bytes_upper_bound": 9960000.0, + "retained_byte_seconds": 2988000000.0, + "retained_bytes": 9960000.0, + "serialized_bytes_per_state": 2495217.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 726975.7380252101, + "disk_bytes_per_state": 16384.0, + "objective_cost": 726975.7380252101, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13933.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 830173.2125760649, + "disk_bytes_per_state": 143360.0, + "objective_cost": 830173.2125760649, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136338.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": null, + "resources": { + "cpu_ns": 16828510.76313025, + "disk_bytes_per_state": 262144.0, + "objective_cost": 16828510.76313025, + "peak_bytes_upper_bound": 996000.0, + "retained_byte_seconds": 298800000.0, + "retained_bytes": 996000.0, + "serialized_bytes_per_state": 254181.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 994498.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 1072070.2905462184, + "disk_bytes_per_state": 172032.0, + "objective_cost": 1072070.2905462184, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164178.0 + } + } + ], + "checked_formal_minimums": false, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json b/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json new file mode 100644 index 00000000..778e01b0 --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json @@ -0,0 +1,428 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": null, + "resources": { + "cpu_ns": 23616342.411764707, + "disk_bytes_per_state": 2502656.0, + "objective_cost": 23616342.411764707, + "peak_bytes_upper_bound": 9960000.0, + "retained_byte_seconds": 2988000000.0, + "retained_bytes": 9960000.0, + "serialized_bytes_per_state": 2495217.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 726975.7380252101, + "disk_bytes_per_state": 16384.0, + "objective_cost": 726975.7380252101, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13933.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 830173.2125760649, + "disk_bytes_per_state": 143360.0, + "objective_cost": 830173.2125760649, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136338.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": null, + "resources": { + "cpu_ns": 16828510.76313025, + "disk_bytes_per_state": 262144.0, + "objective_cost": 16828510.76313025, + "peak_bytes_upper_bound": 996000.0, + "retained_byte_seconds": 298800000.0, + "retained_bytes": 996000.0, + "serialized_bytes_per_state": 254181.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 994498.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 1072070.2905462184, + "disk_bytes_per_state": 172032.0, + "objective_cost": 1072070.2905462184, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164178.0 + } + } + ], + "checked_formal_minimums": false, + "estimated_cpu_savings_ns": 0.0, + "estimated_retained_bytes_savings": 0.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 544554.9513926274, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.05, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": null, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json new file mode 100644 index 00000000..02c16204 --- /dev/null +++ b/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json @@ -0,0 +1,430 @@ +{ + "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", + "model_version": "empirical-update-cpu-v1", + "recommendation": { + "assumptions": [ + "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", + "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", + "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", + "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", + "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" + ], + "candidates": [ + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 1.6347221960194194, + "record_id": "cms-uniform-seed42-w272-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w30000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.006335943223443224, + "record_id": "cms-uniform-seed42-w2720-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w27200-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.3932923866316825, + "record_id": "countsketch-uniform-seed42-w300-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-uniform-seed42-w3000-d83", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + }, + "observed_error_mean": 2.3164860214890104, + "record_id": "cms-zipf-seed42-w272-d5", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w30000-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 726975.7380252101, + "disk_bytes_per_state": 16384.0, + "objective_cost": 890175.7380252101, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13933.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 27200 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w27200-d5", + "rejection": null, + "resources": { + "cpu_ns": 830173.2125760649, + "disk_bytes_per_state": 143360.0, + "objective_cost": 2462173.2125760647, + "peak_bytes_upper_bound": 544000.0, + "retained_byte_seconds": 163200000.0, + "retained_bytes": 544000.0, + "serialized_bytes_per_state": 136338.0 + } + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 300 + } + } + }, + "observed_error_mean": 0.6369033391351014, + "record_id": "countsketch-zipf-seed42-w300-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 3000 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "countsketch-zipf-seed42-w3000-d83", + "rejection": "configuration does not meet the deployment's formal minimum", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.4857875000848293, + "record_id": "cms-uniform-seed42-w512-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w4096-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-uniform-seed42-w32768-d5", + "rejection": "record belongs to another applicability context", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + }, + "observed_error_mean": 0.49153700428012315, + "record_id": "cms-zipf-seed42-w512-d5", + "rejection": "observed error exceeds explicit offline acceptance budget", + "resources": null + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 4096 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w4096-d5", + "rejection": null, + "resources": { + "cpu_ns": 994498.7560698125, + "disk_bytes_per_state": 24576.0, + "objective_cost": 1240258.7560698125, + "peak_bytes_upper_bound": 81920.0, + "retained_byte_seconds": 24576000.0, + "retained_bytes": 81920.0, + "serialized_bytes_per_state": 20818.0 + } + }, + { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 32768 + } + } + }, + "observed_error_mean": 0.0, + "record_id": "cms-zipf-seed42-w32768-d5", + "rejection": null, + "resources": { + "cpu_ns": 1072070.2905462184, + "disk_bytes_per_state": 172032.0, + "objective_cost": 3038150.2905462184, + "peak_bytes_upper_bound": 655360.0, + "retained_byte_seconds": 196608000.0, + "retained_bytes": 655360.0, + "serialized_bytes_per_state": 164178.0 + } + } + ], + "checked_formal_minimums": true, + "estimated_cpu_savings_ns": -182420.78663258266, + "estimated_retained_bytes_savings": 242576.0, + "exact_baseline": { + "configuration": null, + "observed_error_mean": 0.0, + "record_id": "exact-zipf-seed42-w272-d5", + "rejection": null, + "resources": { + "cpu_ns": 544554.9513926274, + "disk_bytes_per_state": null, + "objective_cost": 1435482.9513926273, + "peak_bytes_upper_bound": 626584.0, + "retained_byte_seconds": 89092800.0, + "retained_bytes": 296976.0, + "serialized_bytes_per_state": null + } + }, + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "selected": { + "configuration": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 2720 + } + } + }, + "observed_error_mean": 0.007412989350329503, + "record_id": "cms-zipf-seed42-w2720-d5", + "rejection": null, + "resources": { + "cpu_ns": 726975.7380252101, + "disk_bytes_per_state": 16384.0, + "objective_cost": 890175.7380252101, + "peak_bytes_upper_bound": 54400.0, + "retained_byte_seconds": 16320000.0, + "retained_bytes": 54400.0, + "serialized_bytes_per_state": 13933.0 + } + } + }, + "request": { + "accuracy": { + "max_observed_mean": 0.01, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "minimum_trials": 1 + }, + "context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "786f86a18e85df5f", + "implementation": "polars group_by + std HashMap", + "implementation_version": "polars 0.46.0", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 512 + } + } + } + ], + "query": { + "kind": "point_frequency", + "probe_set": "all_distinct_keys", + "value_type": "i64" + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "workload": { + "horizon_seconds": 300.0, + "input_items_per_state": 20000, + "merges_per_state": 0, + "reads_per_state": 1000, + "state_instances": 1 + } + }, + "schema_version": 1 +} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/request-uniform-are001.json b/tools/empirical-bench/results-sweep/request-uniform-are001.json new file mode 100644 index 00000000..f2df031b --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-uniform-are001.json @@ -0,0 +1,55 @@ +{ + "context": { + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.01, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "formal_minimums": null +} diff --git a/tools/empirical-bench/results-sweep/request-uniform-are005.json b/tools/empirical-bench/results-sweep/request-uniform-are005.json new file mode 100644 index 00000000..636fa287 --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-uniform-are005.json @@ -0,0 +1,55 @@ +{ + "context": { + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.05, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "formal_minimums": null +} diff --git a/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json new file mode 100644 index 00000000..3e093c47 --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json @@ -0,0 +1,65 @@ +{ + "context": { + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.01, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + } + } + ] +} diff --git a/tools/empirical-bench/results-sweep/request-zipf-are001.json b/tools/empirical-bench/results-sweep/request-zipf-are001.json new file mode 100644 index 00000000..ff9d4933 --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-zipf-are001.json @@ -0,0 +1,55 @@ +{ + "context": { + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.01, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "formal_minimums": null +} diff --git a/tools/empirical-bench/results-sweep/request-zipf-are005.json b/tools/empirical-bench/results-sweep/request-zipf-are005.json new file mode 100644 index 00000000..ab88fe56 --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-zipf-are005.json @@ -0,0 +1,55 @@ +{ + "context": { + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.05, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.0 + }, + "formal_minimums": null +} diff --git a/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json new file mode 100644 index 00000000..9d99238c --- /dev/null +++ b/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json @@ -0,0 +1,65 @@ +{ + "context": { + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788886750 + }, + "exact_environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "polars 0.46.0", + "implementation": "polars group_by + std HashMap", + "id": "786f86a18e85df5f" + }, + "query": { + "kind": "point_frequency", + "value_type": "i64", + "probe_set": "all_distinct_keys" + }, + "accuracy": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "max_observed_mean": 0.01, + "minimum_trials": 1 + }, + "workload": { + "input_items_per_state": 20000, + "reads_per_state": 1000, + "merges_per_state": 0, + "state_instances": 1, + "horizon_seconds": 300.0 + }, + "weights": { + "cpu_ns_weight": 1.0, + "retained_byte_seconds_weight": 0.01 + }, + "formal_minimums": [ + { + "algorithm": "Cms", + "params": { + "Cms": { + "width": 512, + "depth": 5 + } + } + } + ] +} diff --git a/tools/empirical-bench/results-sweep/resource-probe.json b/tools/empirical-bench/results-sweep/resource-probe.json new file mode 100644 index 00000000..26c73c65 --- /dev/null +++ b/tools/empirical-bench/results-sweep/resource-probe.json @@ -0,0 +1,1564 @@ +[ + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 508.54296875, + 508.60546875, + 503.3671875, + 504.51953125, + 502.33984375 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 4096, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 1589.0, + 1589.0, + 1537.0, + 1506.0, + 1479.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 996.0, + 961.0, + 965.0, + 932.0, + 929.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 43.3892, + 41.8158, + 41.8477, + 40.3923, + 40.3668 + ], + "update_cpu_ns_samples": [ + 40.53965, + 40.3281, + 39.07075, + 38.25275, + 37.7252 + ] + }, + "serialized_bytes": 1669, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 2, + "build_cpu_ns_samples": [ + 5647288.0, + 5420600.5, + 5456400.5, + 5099760.0, + 4944713.5 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 2498560, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 908768.0, + 896133.0, + 902886.0, + 891512.0, + 904075.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 833.0, + 823.0, + 822.0, + 821.0, + 820.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 1383.136, + 1380.023, + 1381.4343, + 1382.0672, + 1381.7323 + ], + "update_cpu_ns_samples": [ + 959.1098, + 959.1922, + 958.6319, + 959.1734, + 958.36745 + ] + }, + "serialized_bytes": 2490679, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 4096, + "build_cpu_ns_samples": [ + 8.848876953125, + 8.85546875, + 8.822265625, + 8.852783203125, + 8.852783203125 + ], + "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded", + "impl": "polars", + "phases": { + "merge_cpu_ns_samples": [], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 637975.0, + 641239.0, + 629706.0, + 649544.0, + 645667.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 16.1009, + 16.3947, + 16.2567, + 16.2205, + 16.2141 + ], + "update_cpu_ns_samples": [ + 2.3841, + 2.3566, + 2.35455, + 2.25915, + 2.19655 + ] + }, + "sketch": "cms", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 13447.0234375, + 12114.15625, + 12433.76953125, + 4275.65625, + 3038.84375 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 16384, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 2550.0, + 2335.0, + 2542.0, + 2351.0, + 2522.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 823.0, + 822.0, + 822.0, + 821.0, + 822.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 36.6819, + 36.6599, + 36.6409, + 36.6867, + 36.6746 + ], + "update_cpu_ns_samples": [ + 34.65895, + 34.5671, + 34.94255, + 34.41895, + 35.08335 + ] + }, + "serialized_bytes": 13781, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 29, + "build_cpu_ns_samples": [ + 33303.206896551725, + 31832.344827586207, + 31106.44827586207, + 31304.58620689655, + 31182.379310344826 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 143360, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 36384.0, + 42448.0, + 35890.0, + 36848.0, + 36401.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 1031.0, + 1033.0, + 1026.0, + 1037.0, + 1027.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 50.5311, + 50.428, + 50.4055, + 50.5145, + 50.496 + ], + "update_cpu_ns_samples": [ + 46.66935, + 46.3713, + 46.18075, + 46.33685, + 46.0687 + ] + }, + "serialized_bytes": 136183, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 160, + "build_cpu_ns_samples": [ + 6222.75625, + 6166.58125, + 6062.09375, + 5991.53125, + 6013.6375 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 32768, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 8596.0, + 8864.0, + 8525.0, + 8458.0, + 8479.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 819.0, + 825.0, + 822.0, + 830.0, + 825.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 2103.3309, + 2105.7215, + 2106.0344, + 2102.8709, + 2106.2156 + ], + "update_cpu_ns_samples": [ + 757.76065, + 757.68055, + 758.34395, + 757.981, + 757.99515 + ] + }, + "serialized_bytes": 29755, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 16, + "build_cpu_ns_samples": [ + 52732.5, + 50534.25, + 50544.3125, + 50633.9375, + 50733.6875 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 258048, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 68226.0, + 68142.0, + 68548.0, + 67993.0, + 68545.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 822.0, + 822.0, + 823.0, + 830.0, + 819.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 1528.4238, + 1521.666, + 1515.5749, + 1520.3669, + 1509.1788 + ], + "update_cpu_ns_samples": [ + 775.3278, + 773.7087, + 774.62005, + 774.4485, + 774.09825 + ] + }, + "serialized_bytes": 251754, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 417.74609375, + 414.359375, + 411.8359375, + 411.73828125, + 411.36328125 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 4096, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 1049.0, + 1310.0, + 1057.0, + 1054.0, + 1053.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 818.0, + 821.0, + 822.0, + 824.0, + 822.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 35.64947478991596, + 35.66512605042017, + 35.65094537815126, + 36.25808823529412, + 35.674579831932775 + ], + "update_cpu_ns_samples": [ + 33.47005, + 33.65365, + 33.47725, + 33.2758, + 33.1709 + ] + }, + "serialized_bytes": 1722, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 2, + "build_cpu_ns_samples": [ + 5197745.5, + 5027666.0, + 4940209.5, + 4895955.0, + 4894921.0 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 2502656, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 917503.0, + 917380.0, + 902955.0, + 897014.0, + 897698.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 824.0, + 817.0, + 832.0, + 830.0, + 833.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 1388.6273109243698, + 1383.1633403361345, + 1383.381512605042, + 1381.8293067226891, + 1381.1705882352942 + ], + "update_cpu_ns_samples": [ + 832.8432, + 982.88025, + 832.57935, + 831.34725, + 830.7021 + ] + }, + "serialized_bytes": 2495217, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 4096, + "build_cpu_ns_samples": [ + 8.844970703125, + 8.85400390625, + 8.8388671875, + 8.817626953125, + 8.85107421875 + ], + "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded", + "impl": "polars", + "phases": { + "merge_cpu_ns_samples": [], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 477865.0, + 490589.0, + 483664.0, + 498328.0, + 474143.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 16.332773109243696, + 16.209768907563024, + 16.318802521008404, + 16.46344537815126, + 16.43876050420168 + ], + "update_cpu_ns_samples": [ + 2.2059, + 2.15235, + 2.1508, + 2.1614, + 2.14845 + ] + }, + "sketch": "cms", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 18798.375, + 11896.2578125, + 11965.53125, + 12035.4453125, + 12118.765625 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 16384, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 2550.0, + 2597.0, + 2546.0, + 2556.0, + 3060.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 815.0, + 827.0, + 822.0, + 819.0, + 821.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 36.89128151260504, + 37.29810924369748, + 36.93077731092437, + 36.986449579831934, + 36.9186974789916 + ], + "update_cpu_ns_samples": [ + 34.0155, + 33.94675, + 33.58855, + 33.84835, + 33.7528 + ] + }, + "serialized_bytes": 13933, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 2720, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 29, + "build_cpu_ns_samples": [ + 29816.068965517243, + 29051.655172413793, + 29082.206896551725, + 29451.103448275862, + 29141.793103448275 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 143360, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 32736.0, + 32339.0, + 32908.0, + 35918.0, + 32294.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 875.0, + 874.0, + 874.0, + 874.0, + 889.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 42.77100840336134, + 42.79705882352941, + 42.72153361344538, + 42.73487394957983, + 42.76376050420168 + ], + "update_cpu_ns_samples": [ + 37.80365, + 37.96745, + 37.71345, + 38.2411, + 37.8011 + ] + }, + "serialized_bytes": 136338, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 27200, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 160, + "build_cpu_ns_samples": [ + 5866.0, + 5774.475, + 5811.2875, + 5753.3, + 5741.4125 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 32768, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 8519.0, + 8507.0, + 8576.0, + 8615.0, + 8445.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 819.0, + 822.0, + 819.0, + 823.0, + 829.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 2097.363970588235, + 2103.9829831932775, + 2092.8003151260505, + 2103.7350840336135, + 2103.095168067227 + ], + "update_cpu_ns_samples": [ + 756.596, + 756.77665, + 756.93295, + 756.9757, + 756.9093 + ] + }, + "serialized_bytes": 29853, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 300, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 16, + "build_cpu_ns_samples": [ + 53888.4375, + 50796.875, + 51187.625, + 50844.6875, + 50833.3125 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 262144, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 68436.0, + 68030.0, + 67865.0, + 68061.0, + 69020.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 821.0, + 831.0, + 829.0, + 819.0, + 823.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 1514.8473739495798, + 1509.3008403361343, + 1507.2617647058823, + 1482.4311974789916, + 1490.7167016806723 + ], + "update_cpu_ns_samples": [ + 763.4282, + 764.272, + 763.44085, + 762.49765, + 765.38355 + ] + }, + "serialized_bytes": 254181, + "sketch": "countsketch-regularpath-vector2d", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 3000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 656.62109375, + 643.47265625, + 644.90625, + 678.234375, + 645.51953125 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 4096, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 1171.0, + 1198.0, + 1183.0, + 1191.0, + 1177.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 821.0, + 823.0, + 822.0, + 824.0, + 823.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 35.6478, + 35.6694, + 35.6529, + 35.6541, + 35.6493 + ], + "update_cpu_ns_samples": [ + 33.63535, + 33.61815, + 33.72835, + 33.5152, + 33.6219 + ] + }, + "serialized_bytes": 2759, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 195, + "build_cpu_ns_samples": [ + 5506.984615384616, + 4905.71282051282, + 4834.553846153846, + 4821.738461538462, + 4800.410256410257 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 24576, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 6332.0, + 6387.0, + 6329.0, + 6284.0, + 3933.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 828.0, + 822.0, + 821.0, + 822.0, + 828.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 37.4427, + 37.4461, + 37.4753, + 37.4304, + 37.4698 + ], + "update_cpu_ns_samples": [ + 34.783, + 35.34095, + 34.9518, + 34.5292, + 35.4273 + ] + }, + "serialized_bytes": 20661, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 24, + "build_cpu_ns_samples": [ + 36561.333333333336, + 35154.25, + 34808.875, + 35120.25, + 34991.833333333336 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 172032, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 44100.0, + 44294.0, + 36263.0, + 44547.0, + 44293.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 933.0, + 931.0, + 931.0, + 932.0, + 938.0 + ], + "query_distinct_keys": 1000, + "query_passes": 10, + "read_cpu_ns_samples": [ + 45.9499, + 45.9485, + 45.9521, + 45.9228, + 46.4604 + ], + "update_cpu_ns_samples": [ + 42.05545, + 43.03045, + 42.78075, + 42.0556, + 42.92265 + ] + }, + "serialized_bytes": 164023, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 256, + "build_cpu_ns_samples": [ + 742.98828125, + 741.7109375, + 737.2890625, + 738.0390625, + 735.29296875 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 4096, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 1489.0, + 2011.0, + 1495.0, + 2167.0, + 2063.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 994.0, + 996.0, + 995.0, + 990.0, + 998.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 43.57920168067227, + 43.60976890756302, + 43.579726890756305, + 43.61008403361345, + 43.634033613445375 + ], + "update_cpu_ns_samples": [ + 40.72625, + 40.62455, + 40.53815, + 40.6358, + 40.52295 + ] + }, + "serialized_bytes": 2913, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 512, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 195, + "build_cpu_ns_samples": [ + 5666.005128205128, + 5452.317948717949, + 5530.71282051282, + 5424.892307692307, + 5387.902564102564 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 24576, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 8670.0, + 8643.0, + 8638.0, + 8638.0, + 8646.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 1118.0, + 1115.0, + 1128.0, + 1110.0, + 1122.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 51.52142857142857, + 52.21050420168067, + 51.51953781512605, + 51.559768907563026, + 51.46271008403362 + ], + "update_cpu_ns_samples": [ + 46.56925, + 46.8706, + 47.1386, + 46.99205, + 46.7674 + ] + }, + "serialized_bytes": 20818, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 4096, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "build_batch": 24, + "build_cpu_ns_samples": [ + 37890.791666666664, + 37457.333333333336, + 37113.708333333336, + 37216.25, + 37070.041666666664 + ], + "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", + "disk_bytes": 172032, + "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", + "impl": "lib", + "phases": { + "merge_cpu_ns_samples": [ + 47727.0, + 47241.0, + 48761.0, + 47832.0, + 49361.0 + ], + "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", + "prepare_cpu_ns_samples": [ + 1106.0, + 1114.0, + 1117.0, + 1127.0, + 1123.0 + ], + "query_distinct_keys": 952, + "query_passes": 10, + "read_cpu_ns_samples": [ + 55.508823529411764, + 55.5110294117647, + 55.526785714285715, + 55.52153361344538, + 55.45115546218487 + ], + "update_cpu_ns_samples": [ + 48.9831, + 49.29785, + 48.762, + 48.62545, + 49.1358 + ] + }, + "serialized_bytes": 164178, + "sketch": "cms-regularpath-vector2d", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 32768, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + } +] diff --git a/tools/empirical-bench/results/MEASUREMENTS.md b/tools/empirical-bench/results/MEASUREMENTS.md new file mode 100644 index 00000000..68e2c345 --- /dev/null +++ b/tools/empirical-bench/results/MEASUREMENTS.md @@ -0,0 +1,59 @@ +# Offline frequency measurements, 2026-09-08 + +Audience: planner developers evaluating offline evidence integration. + +Actual ProjectASAP/sketch-bench revision +`87f619e843fd2e4da784160d4e205a0d0d55f032` was built in release mode using +`asap_sketchlib 0.2.2`, RegularPath/Vector2D, with Polars limited to one thread. +All inputs are synthetic: 20,000 i64 keys, key-space 1,000, seed 42. Uniform has +1,000 distinct keys; Zipf (exponent 1.1) has 952. No o11y trace distribution was +measured. Five timed repetitions follow two warmups; each distribution has one +offline accuracy trial. Raw samples and standard deviations are retained. + +| Distribution / implementation | Insert CPU ns/item | Read CPU ns/key | Retained requested heap B | Peak requested heap B | Mean absolute relative frequency error | +| --- | ---: | ---: | ---: | ---: | ---: | +| Uniform CMS (272 × 5) | 36.64 | 49.80 | 5,440 | 5,440 | 1.6347 | +| Uniform CountSketch (30,000 × 83) | 1,179.19 | 3,813.40 | 9,960,000 | 9,960,000 | 0 | +| Zipf CMS (272 × 5) | 35.68 | 44.33 | 5,440 | 5,440 | 2.3165 | +| Zipf CountSketch (30,000 × 83) | 948.19 | 3,911.34 | 9,960,000 | 9,960,000 | 0 | + +CMS is much cheaper at these formal sizing points, but average relative error +on individual low-frequency keys is high (163.47% / 231.65%). Its formal epsilon +parameter bounds additive error relative to stream mass; it does **not** promise +1% relative error per key. CountSketch's zero observed error is only for these +fixed offline inputs. None of these errors estimates PromQL count_over_time error. + +| Exact baseline | Insert CPU ns/item | Prepare CPU ns/dataset | Read CPU ns/key | Prepared state footprint B (upstream formula) | +| --- | ---: | ---: | ---: | ---: | +| Uniform Polars group-by + HashMap | 1.80 | 653,000 | 52.40 | 290,816 | +| Zipf Polars group-by + HashMap | 1.87 | 705,800 | 55.46 | 290,816 | + +The exact reference buffers input, groups/counts with Polars, and then serves +point-frequency reads from a HashMap. Its offline error is zero. Prepared state +footprint is taken from the query operation, because upstream flattening preserves +the first operation's memory and would otherwise omit the constructed index. +The exact footprint is formula based; do not label it measured peak heap. + +For an illustrative 1,000 point lookups after loading these 20,000 keys, adding +the measured insert/prepare/read components gives 0.783 ms CMS versus 0.741 ms +exact on uniform, and 0.758 ms CMS versus 0.799 ms exact on Zipf. CountSketch +gives 27.397 ms and 22.875 ms respectively. These are **partial CPU component +estimates**, excluding unmeasured empty-sketch construction. They are neither +complete cost estimates nor a demonstrated query-frequency break-even point. +They also show that a smaller sketch is not automatically faster than a prepared +exact index. CPU timings cover the upstream wrapper regions, including their +allocation/destruction overhead; they are not hardware instruction costs. + +The companion memory probe uses the identical upstream dataset generator and +release sketch libraries, but a counting System allocator. It measures requested +allocation bytes across construction and insertion while the sketch remains +alive, excludes the input dataset, and asserts every sketch allocation is released +after destruction. It does not measure allocator-resident pages or jemalloc +overhead. Process RSS remains in the raw reports. Disk usage and serialized +state size were not measured and remain null. + +Files `manifest.json`, `operation-reports.json`, `raw.json`, `memory-probe.json`, +`planner-evidence.json`, and `exact-baselines.json` preserve the evidence and +provenance. `context-uniform.json` and `context-zipf.json` explicitly select the +synthetic applicability contexts; they must not be represented as actual o11y +production distribution profiles. diff --git a/tools/empirical-bench/results/context-uniform.json b/tools/empirical-bench/results/context-uniform.json new file mode 100644 index 00000000..6ff26d0a --- /dev/null +++ b/tools/empirical-bench/results/context-uniform.json @@ -0,0 +1,23 @@ +{ + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788884981 +} diff --git a/tools/empirical-bench/results/context-zipf.json b/tools/empirical-bench/results/context-zipf.json new file mode 100644 index 00000000..7e87d609 --- /dev/null +++ b/tools/empirical-bench/results/context-zipf.json @@ -0,0 +1,23 @@ +{ + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "now_unix_seconds": 1788884981 +} diff --git a/tools/empirical-bench/results/control-plane-uniform.json b/tools/empirical-bench/results/control-plane-uniform.json new file mode 100644 index 00000000..c40c4ba3 --- /dev/null +++ b/tools/empirical-bench/results/control-plane-uniform.json @@ -0,0 +1,1514 @@ +{ + "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "estimated_end_to_end_savings": null, + "evaluation": "offline control-plane parser and typed summary binder", + "limitations": [ + "No deployed execution or measured end-to-end speedup", + "Binding does not establish executable placement or complete physical cost", + "Offline point-frequency errors do not establish current query guarantees", + "raw_subtrees includes necessary source scans beneath summaries" + ], + "offline_context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788884981 + }, + "rows": [ + { + "mode": "exact", + "planning_elapsed_ns": 27434443, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 6405157, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 5630308, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 14595871, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 13451043, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 4188644, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3678170, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3597895, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3597275, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7672146, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3657117, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3495810, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7709890, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 17076017, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7749242, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7688654, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 15125186, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9693543, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9575688, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3521263, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3730234, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3680909, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 4272290, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10536858, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10768134, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3657396, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3497834, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10835529, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3816630, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3809245, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 11147922, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9627400, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3888241, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3607890, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3597267, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3597007, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7629404, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3650613, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3484174, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7696159, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 17079269, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7725621, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7690073, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 15163332, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9692694, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9819254, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3521499, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3727545, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3692986, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 4277757, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10652378, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10765416, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3651311, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3496064, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10848084, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3816009, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3807853, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 11156018, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9632847, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3887231, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3606602, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3595247, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3596062, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7628702, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3641194, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3480084, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7708071, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 17116742, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7729489, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7686562, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 15150427, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9698577, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9604337, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3517647, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3725320, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3680353, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 4274444, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10585578, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10753797, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3648188, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3497024, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + } + ], + "schema_version": 1, + "reproduction": { + "command": [ + "cargo", + "run", + "--quiet", + "-p", + "control_plane", + "--example", + "offline_planner_replay", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-types.path=\"/mydata/asapplanner-empirical-o11y/crates/types\"", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-aware-mapping.path=\"/mydata/asapplanner-empirical-o11y/crates/asap-aware-mapping\"", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-frontend-promql.path=\"/mydata/asapplanner-empirical-o11y/crates/frontend-promql\"", + "--", + "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/planner-evidence.json", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/context-uniform.json" + ], + "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", + "planner_revision": "378a7547ede629a64e84c9f7c810226ce196cce9", + "backend_dirty": true, + "planner_dirty": true + } +} diff --git a/tools/empirical-bench/results/control-plane-zipf.json b/tools/empirical-bench/results/control-plane-zipf.json new file mode 100644 index 00000000..5d013cc1 --- /dev/null +++ b/tools/empirical-bench/results/control-plane-zipf.json @@ -0,0 +1,1514 @@ +{ + "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "estimated_end_to_end_savings": null, + "evaluation": "offline control-plane parser and typed summary binder", + "limitations": [ + "No deployed execution or measured end-to-end speedup", + "Binding does not establish executable placement or complete physical cost", + "Offline point-frequency errors do not establish current query guarantees", + "raw_subtrees includes necessary source scans beneath summaries" + ], + "offline_context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788884981 + }, + "rows": [ + { + "mode": "exact", + "planning_elapsed_ns": 13618375, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3913658, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3825015, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 11291391, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9768080, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3929460, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3617283, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3600486, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3599199, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7616848, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3658985, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3493575, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7694876, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 17086430, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7744155, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 7689656, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 15144628, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9690126, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 9581458, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3518909, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3728937, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3683514, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 4276098, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10570285, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 10769067, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3661493, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "exact", + "planning_elapsed_ns": 3506212, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10851425, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3817582, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3808790, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 11145207, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9633223, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3887339, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3611686, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3601361, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3601327, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7638604, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3651510, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3490318, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7697119, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 17097214, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7758420, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 7687412, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 15156651, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9691912, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 9619212, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3519362, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3731478, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3682788, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 4276094, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10587359, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 10761262, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3651028, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "default", + "planning_elapsed_ns": 3505688, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10875564, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3813251, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3806064, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": true, + "states": [], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 11149403, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9624198, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3889748, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3609383, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3597467, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3590531, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7633998, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3650290, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(MinMax, MinMax)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3485280, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7714510, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 17101498, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "result": { + "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", + "status": "rejected" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7731176, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 7686433, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 15131031, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9698399, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 9609415, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3521210, + "query": "sum(process_resident_memory_bytes)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3729320, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3683603, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 4279041, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10764536, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 10855317, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "result": { + "raw_subtrees": 2, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + }, + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Rate, Rate)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3650361, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + }, + { + "exact_family": "ExactAggregate(Increase, Increase)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + }, + { + "mode": "empirical", + "planning_elapsed_ns": 3500505, + "query": "sum(up)", + "result": { + "raw_subtrees": 1, + "root_raw_fallback": false, + "states": [ + { + "exact_family": "ExactAggregate(Sum, Sum)" + } + ], + "status": "bound", + "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" + } + } + ], + "schema_version": 1, + "reproduction": { + "command": [ + "cargo", + "run", + "--quiet", + "-p", + "control_plane", + "--example", + "offline_planner_replay", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-types.path=\"/mydata/asapplanner-empirical-o11y/crates/types\"", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-aware-mapping.path=\"/mydata/asapplanner-empirical-o11y/crates/asap-aware-mapping\"", + "--config", + "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-frontend-promql.path=\"/mydata/asapplanner-empirical-o11y/crates/frontend-promql\"", + "--", + "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/planner-evidence.json", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/context-zipf.json" + ], + "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", + "planner_revision": "378a7547ede629a64e84c9f7c810226ce196cce9", + "backend_dirty": true, + "planner_dirty": true + } +} diff --git a/tools/empirical-bench/results/exact-baselines.json b/tools/empirical-bench/results/exact-baselines.json new file mode 100644 index 00000000..3ead02ae --- /dev/null +++ b/tools/empirical-bench/results/exact-baselines.json @@ -0,0 +1,113 @@ +[ + { + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "implementation": "polars exact group_by + HashMap", + "insert_cpu_ns_per_item": { + "value": 1.8, + "stddev": 0.25248762345905185, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "prepare_cpu_ns_per_dataset": { + "value": 653000.0, + "stddev": 14713.938969562161, + "samples": 5 + }, + "read_cpu_ns_per_key": { + "value": 52.400000000000006, + "stddev": 2.701851217221263, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": 290816, + "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + { + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "implementation": "polars exact group_by + HashMap", + "insert_cpu_ns_per_item": { + "value": 1.87, + "stddev": 0.3053686296920494, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "prepare_cpu_ns_per_dataset": { + "value": 705800.0, + "stddev": 8927.485648266258, + "samples": 5 + }, + "read_cpu_ns_per_key": { + "value": 55.462184873949575, + "stddev": 0.8788445656870514, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": 290816, + "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } +] diff --git a/tools/empirical-bench/results/manifest.json b/tools/empirical-bench/results/manifest.json new file mode 100644 index 00000000..c7d638c2 --- /dev/null +++ b/tools/empirical-bench/results/manifest.json @@ -0,0 +1,490 @@ +{ + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "source_dirty": false, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2" + }, + "binary_sha256": "1c2aebd6649ecf9dd2a77dbc6c6c4bd89d07c061f387389e12698dfe41dbc6d4", + "invocations": [ + { + "id": "cms-uniform-seed42", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ] + }, + { + "id": "countsketch-uniform-seed42", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ] + }, + { + "id": "exact-uniform-seed42", + "distribution_id": "uniform-n20000-c1000-seed42", + "distribution": "uniform", + "algorithm": "Exact", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query", + "--metrics", + "throughput,cpu,memory" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy" + ], + "prepare_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "uniform", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "prepare", + "--metrics", + "cpu,memory" + ] + }, + { + "id": "cms-zipf-seed42", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Cms", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "countsketch-zipf-seed42", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "CountSketch", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query,merge", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "countsketch-regularpath-vector2d", + "--library", + "lib", + "--config", + "rows=83 cols=30000", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": null + }, + { + "id": "exact-zipf-seed42", + "distribution_id": "zipf-n20000-c1000-seed42", + "distribution": "zipf", + "algorithm": "Exact", + "argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "insert,query", + "--metrics", + "throughput,cpu,memory", + "--zipf-s", + "1.1" + ], + "accuracy_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "query", + "--metrics", + "accuracy", + "--zipf-s", + "1.1" + ], + "prepare_argv": [ + "/mydata/sketch-bench-empirical-322/target/release/approxbench", + "sketchbench", + "--variant", + "cms", + "--library", + "polars", + "--config", + "rows=5 cols=272", + "--dataset", + "zipf", + "--size", + "20000", + "--cardinality", + "1000", + "--dtype", + "i64", + "--seed", + "42", + "--runs", + "5", + "--warmup-runs", + "2", + "--operations", + "prepare", + "--metrics", + "cpu,memory", + "--zipf-s", + "1.1" + ] + } + ], + "memory_probe": { + "source_sha256": "e2bf16003e7c87043142eba31f5b7ea6c055e7cefb9ce4f3545bfa6a077ddba5", + "compile_argv": [ + "rustc", + "--edition=2021", + "-C", + "opt-level=3", + "-C", + "panic=abort", + "-C", + "target-cpu=native", + "-L", + "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", + "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/memory_probe.rs", + "-o", + "/tmp/asap-memory-probe-nywrmqf_/memory-probe", + "--extern", + "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", + "--extern", + "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", + "--extern", + "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib" + ], + "allocator": "System + requested-byte tracking; CPU evidence still from uninstrumented jemalloc bench" + }, + "runtime_provenance": { + "runtime_field_status": "declared build preconditions, not introspected from the executable", + "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", + "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", + "declared_settings": "release; repository target-cpu=native; default jemalloc", + "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", + "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings" + } +} diff --git a/tools/empirical-bench/results/memory-probe.json b/tools/empirical-bench/results/memory-probe.json new file mode 100644 index 00000000..2517a8e2 --- /dev/null +++ b/tools/empirical-bench/results/memory-probe.json @@ -0,0 +1,198 @@ +[ + { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ] + ], + "sketch": "cms-regularpath-vector2d", + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ], + [ + 5440, + 5440 + ] + ], + "sketch": "cms-regularpath-vector2d", + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + }, + { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": [ + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ], + [ + 9960000, + 9960000 + ] + ], + "sketch": "countsketch-regularpath-vector2d", + "workload": { + "synthetic": { + "description": { + "column_label": [ + "key" + ], + "column_num": 1, + "column_spec": [ + { + "data_type": "i64", + "distribution": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "special_rule": 0 + } + ], + "row_num": 20000 + } + } + } + } +] diff --git a/tools/empirical-bench/results/o11y-exact-snapshot.json b/tools/empirical-bench/results/o11y-exact-snapshot.json new file mode 100644 index 00000000..82377f42 --- /dev/null +++ b/tools/empirical-bench/results/o11y-exact-snapshot.json @@ -0,0 +1,1888 @@ +{ + "arch": "x86_64", + "build_profile": "release", + "clock": "CLOCK_PROCESS_CPUTIME_ID", + "command_arguments": [ + "300", + "60" + ], + "cpu": "model name\t: Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "data": "synthetic deterministic finite gauges; three jobs; non-stale finite float samples on (T-window,T] every60s", + "implementation": "o11y_exact_bench Rust reference kernels; not production data-plane runtime", + "os": "linux", + "rows": [ + { + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.9824839157255253, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 1728000, + "kernel": "MaxWindow", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "range_seconds": 43200, + "raw_cpu_ns": 9853524.96, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 164225.41600000003, + "samples_cpu_ns": [ + 186697.68, + 173569.36, + 164596.08, + 154922.28, + 141341.68 + ], + "stddev_cpu_ns": 17339.716284543985 + }, + "retained_value_bytes": 800, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 720, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "selected_series": 100, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 172595.17360000004, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 139.49596, + "samples_cpu_ns": [ + 141.2754, + 137.058, + 146.2487, + 137.3208, + 135.5769 + ], + "stddev_cpu_ns": 4.324346930231208 + } + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.9815750969610489, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 864000, + "kernel": "MaxWindow", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "range_seconds": 21600, + "raw_cpu_ns": 3878217.12, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 64636.952000000005, + "samples_cpu_ns": [ + 66078.6, + 65944.4, + 64936.36, + 63269.76, + 62955.64 + ], + "stddev_cpu_ns": 1464.0217198935266 + }, + "retained_value_bytes": 800, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 360, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "selected_series": 100, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 71455.77440000001, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 113.64704000000002, + "samples_cpu_ns": [ + 115.1532, + 115.1529, + 115.5931, + 111.8675, + 110.4685 + ], + "stddev_cpu_ns": 2.3234220963914396 + } + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.9814922372731635, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 864000, + "kernel": "MaxWindow", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "range_seconds": 21600, + "raw_cpu_ns": 3272973.5999999996, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 54549.56, + "samples_cpu_ns": [ + 56317.4, + 54367.08, + 54533.08, + 54425.68, + 53104.56 + ], + "stddev_cpu_ns": 1146.9742870701168 + }, + "retained_value_bytes": 800, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 360, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "selected_series": 100, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 60575.4188, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 100.43098, + "samples_cpu_ns": [ + 102.5627, + 103.9565, + 99.5733, + 97.2646, + 98.7978 + ], + "stddev_cpu_ns": 2.756917464669557 + } + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.9821747684578059, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 864000, + "kernel": "MaxWindow", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "range_seconds": 21600, + "raw_cpu_ns": 8134862.880000001, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 135581.048, + "samples_cpu_ns": [ + 141600.36, + 137506.4, + 133386.4, + 132743.76, + 132668.32 + ], + "stddev_cpu_ns": 3914.3889918504437 + }, + "retained_value_bytes": 2400, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 360, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "selected_series": 300, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 145005.8144, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 157.07944, + "samples_cpu_ns": [ + 155.825, + 157.0564, + 156.6706, + 157.1387, + 158.7065 + ], + "stddev_cpu_ns": 1.047871257836577 + } + }, + { + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.9827627106185279, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 864000, + "kernel": "SumAverageWindow", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "range_seconds": 21600, + "raw_cpu_ns": 8558658.24, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 142644.304, + "samples_cpu_ns": [ + 142854.44, + 142844.92, + 142754.04, + 142416.32, + 142351.8 + ], + "stddev_cpu_ns": 241.85801719191133 + }, + "retained_value_bytes": 8, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 360, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "selected_series": 300, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 147528.0688, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 81.39608000000001, + "samples_cpu_ns": [ + 81.4132, + 81.261, + 81.2814, + 81.6113, + 81.4135 + ], + "stddev_cpu_ns": 0.13992346836753305 + } + }, + { + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.8095244674137372, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 2400, + "kernel": "SumInstant", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "sum(process_resident_memory_bytes)", + "range_seconds": 0, + "raw_cpu_ns": 28141.92, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 469.032, + "samples_cpu_ns": [ + 484.4, + 465.92, + 465.28, + 465.4, + 464.16 + ], + "stddev_cpu_ns": 8.61488943631895 + }, + "retained_value_bytes": 8, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 1, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "selected_series": 300, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 5360.3472, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 81.52192, + "samples_cpu_ns": [ + 81.8304, + 81.299, + 81.7548, + 81.2867, + 81.4387 + ], + "stddev_cpu_ns": 0.2556072905845993 + } + }, + { + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "reason": "no complete reference kernel for this query; no borrowed costs", + "status": "unavailable" + }, + { + "accepted_measured_candidates": 1, + "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", + "estimated_cpu_reduction_fraction": 0.8124295279253828, + "evaluations": 60, + "exclusions": [ + "disk/network storage and protocol serialization", + "label output materialization shared by both paths", + "live updates, eviction, sliding windows, staleness and exceptional samples" + ], + "input_series": 300, + "input_value_bytes": 2400, + "kernel": "SumInstant", + "output_equality_verified": true, + "planner_candidate_count": 1, + "profile_model_version": "fixed-snapshot-exact-values-v1", + "query": "sum(up)", + "range_seconds": 0, + "raw_cpu_ns": 28544.640000000003, + "raw_per_evaluation": { + "iterations_per_sample": 25, + "mean_cpu_ns": 475.744, + "samples_cpu_ns": [ + 489.12, + 472.72, + 472.72, + 471.88, + 472.28 + ], + "stddev_cpu_ns": 7.485591492995059 + }, + "retained_value_bytes": 8, + "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", + "sample_interval_seconds": 60, + "samples_per_series": 1, + "selected": "retained_exact_summary", + "selected_planner_graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "selected_series": 300, + "status": "profiled_fixed_snapshot", + "summary_cpu_ns": 5354.1316, + "summary_read_per_evaluation": { + "iterations_per_sample": 10000, + "mean_cpu_ns": 81.30646, + "samples_cpu_ns": [ + 81.2769, + 81.2786, + 81.6576, + 81.0842, + 81.235 + ], + "stddev_cpu_ns": 0.2118108306956964 + } + } + ], + "schema_version": 1, + "source_file": "crates/devtools/src/bin/o11y_exact_bench.rs", + "source_revision": "bc7cf2a5c48f3bf34c3d69139d45370a9f23aafe", + "timing_environment": "shared development host; no exclusive core reservation or CPU affinity" +} \ No newline at end of file diff --git a/tools/empirical-bench/results/operation-reports.json b/tools/empirical-bench/results/operation-reports.json new file mode 100644 index 00000000..2fd5ae38 --- /dev/null +++ b/tools/empirical-bench/results/operation-reports.json @@ -0,0 +1,2215 @@ +[ + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 27462414.421672627, + "stddev": 2121229.9002417843, + "n": 5, + "samples": [ + 31031952.049427696, + 26920835.24583434, + 25374495.84048577, + 27277277.618584555, + 26707511.354030766 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7328, + "stddev": 0.05344810567269899, + "n": 5, + "samples": [ + 0.645, + 0.745, + 0.79, + 0.734, + 0.75 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7315346, + "stddev": 0.052957671689756146, + "n": 5, + "samples": [ + 0.644497, + 0.742919, + 0.788193, + 0.733211, + 0.748853 + ] + }, + "rss_peak_kb": 11636, + "heap_allocated_kb": 1051, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:27.004798255Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 21136707.885741428, + "stddev": 1286805.8474790915, + "n": 5, + "samples": [ + 22205444.775058843, + 20005601.568439163, + 21994457.396736022, + 19484062.03725353, + 21993973.65121957 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.049800000000000004, + "stddev": 0.0031144823004794846, + "n": 5, + "samples": [ + 0.046, + 0.052, + 0.047, + 0.053, + 0.051 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.047455399999999995, + "stddev": 0.002964145205619997, + "n": 5, + "samples": [ + 0.045034, + 0.049986, + 0.045466, + 0.051324, + 0.045467 + ] + }, + "rss_peak_kb": 11636, + "heap_allocated_kb": 733, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:27.004806892Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.011600000000000001, + "stddev": 0.007924645102463582, + "n": 5, + "samples": [ + 0.019, + 0.016, + 0.017, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0106172, + "stddev": 0.00819797570745364, + "n": 5, + "samples": [ + 0.017742, + 0.015598, + 0.016393, + 0.001567, + 0.001786 + ] + }, + "rss_peak_kb": 11636, + "heap_allocated_kb": 637, + "memory_bytes": 5440, + "merge_folds_per_sec": { + "mean": 275909.67387786397, + "stddev": 296280.2804938654, + "n": 5, + "samples": [ + 56363.43140570398, + 64110.78343377357, + 61001.6470444702, + 638162.0931716656, + 559910.4143337066 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:27.004813199Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.036823, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.036823 + ] + }, + "memory_bytes": 5440, + "accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.0794538568545333, + "are_top1000": 1.6347221960194203, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:37.016887019Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 848776.7177355861, + "stddev": 25678.34947988661, + "n": 5, + "samples": [ + 809565.9281549908, + 837084.7635798482, + 862354.5833025042, + 873857.5295890344, + 861020.7840515531 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 22.788200000000003, + "stddev": 2.090169060148008, + "n": 5, + "samples": [ + 24.698, + 23.895, + 23.195, + 22.89, + 19.263 + ] + }, + "sys_ms": { + "mean": 0.7956, + "stddev": 1.7734307993265483, + "n": 5, + "samples": [ + 0.01, + 0.0, + 0.0, + 0.0, + 3.968 + ] + } + }, + "wall_time_ms": { + "mean": 23.580925, + "stddev": 0.7274234664406292, + "n": 5, + "samples": [ + 24.704597, + 23.892443, + 23.192316, + 22.887026, + 23.228243 + ] + }, + "rss_peak_kb": 282480, + "heap_allocated_kb": 243573, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:47.716913903Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 262769.15824652876, + "stddev": 10337.665821738738, + "n": 5, + "samples": [ + 271225.35002309486, + 264678.5426164215, + 250768.41712216657, + 273759.29549687856, + 253414.18597408233 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 3.8133999999999997, + "stddev": 0.15151831572453558, + "n": 5, + "samples": [ + 3.69, + 3.78, + 3.99, + 3.655, + 3.952 + ] + } + }, + "wall_time_ms": { + "mean": 3.8103670000000003, + "stddev": 0.15080200586033313, + "n": 5, + "samples": [ + 3.686971, + 3.778168, + 3.987743, + 3.652844, + 3.946109 + ] + }, + "rss_peak_kb": 282480, + "heap_allocated_kb": 175245, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:47.716918767Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.9907999999999999, + "stddev": 1.4396316195471675, + "n": 5, + "samples": [ + 3.158, + 0.0, + 0.0, + 0.0, + 1.796 + ] + }, + "sys_ms": { + "mean": 2.331, + "stddev": 1.501450964900286, + "n": 5, + "samples": [ + 0.0, + 3.324, + 3.358, + 3.351, + 1.622 + ] + } + }, + "wall_time_ms": { + "mean": 3.3203256, + "stddev": 0.0979774039526462, + "n": 5, + "samples": [ + 3.156568, + 3.321947, + 3.356612, + 3.349021, + 3.41748 + ] + }, + "rss_peak_kb": 282480, + "heap_allocated_kb": 77909, + "memory_bytes": 9960000, + "merge_folds_per_sec": { + "mean": 301.39109825961305, + "stddev": 9.144410218672732, + "n": 5, + "samples": [ + 316.7997648078546, + 301.0282825102267, + 297.9194497308596, + 298.5947236520762, + 292.6132705970481 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:47.716927415Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 13.171889, + "stddev": 0.0, + "n": 1, + "samples": [ + 13.171889 + ] + }, + "memory_bytes": 9960000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:27:57.855957080Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 582378449.9780885, + "stddev": 76256068.40887626, + "n": 5, + "samples": [ + 685518423.3076264, + 470278404.8156509, + 582360306.3215212, + 589640024.764881, + 584095090.6807629 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.036000000000000004, + "stddev": 0.005049752469181039, + "n": 5, + "samples": [ + 0.03, + 0.044, + 0.036, + 0.035, + 0.035 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0348412, + "stddev": 0.004812785388940589, + "n": 5, + "samples": [ + 0.029175, + 0.042528, + 0.034343, + 0.033919, + 0.034241 + ] + }, + "rss_peak_kb": 19412, + "heap_allocated_kb": 3248, + "memory_bytes": 262144 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:00.917715465Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 19766077.209879298, + "stddev": 1504687.1387838016, + "n": 5, + "samples": [ + 18675880.10084975, + 19261513.56973631, + 18904306.400998145, + 19606305.38781272, + 22382380.589999553 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0524, + "stddev": 0.0027018512172212595, + "n": 5, + "samples": [ + 0.055, + 0.053, + 0.054, + 0.052, + 0.048 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0508084, + "stddev": 0.0035603533953808553, + "n": 5, + "samples": [ + 0.053545, + 0.051917, + 0.052898, + 0.051004, + 0.044678 + ] + }, + "rss_peak_kb": 19680, + "heap_allocated_kb": 2116, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:00.917722161Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.038572, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.038572 + ] + }, + "memory_bytes": 290816, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:10.930037284Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "latency", + "operation": "prepare", + "cpu_time_ms": { + "user_ms": { + "mean": 0.653, + "stddev": 0.014713938969562171, + "n": 5, + "samples": [ + 0.649, + 0.677, + 0.642, + 0.641, + 0.656 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.6191846, + "stddev": 0.011506340504261124, + "n": 5, + "samples": [ + 0.616856, + 0.636202, + 0.609315, + 0.608852, + 0.624698 + ] + }, + "rss_peak_kb": 18100, + "heap_allocated_kb": 1834, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:30:39.897095505Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 28162721.602043852, + "stddev": 1809029.7585605541, + "n": 5, + "samples": [ + 31390767.975138515, + 27135201.139678445, + 27427355.221277043, + 27439170.78825878, + 27421112.88586647 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.7136, + "stddev": 0.04242994225779712, + "n": 5, + "samples": [ + 0.638, + 0.739, + 0.73, + 0.73, + 0.731 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.7123258, + "stddev": 0.042175054009449736, + "n": 5, + "samples": [ + 0.63713, + 0.73705, + 0.729199, + 0.728885, + 0.729365 + ] + }, + "rss_peak_kb": 11388, + "heap_allocated_kb": 1063, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:21.096730810Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 23701944.566575978, + "stddev": 311244.1665571999, + "n": 5, + "samples": [ + 24085412.133785356, + 23567273.177373435, + 23406766.325727772, + 23466193.39890064, + 23984077.797092687 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0422, + "stddev": 0.0010954451150103303, + "n": 5, + "samples": [ + 0.041, + 0.042, + 0.042, + 0.042, + 0.044 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.040171, + "stddev": 0.0005253784350351676, + "n": 5, + "samples": [ + 0.039526, + 0.040395, + 0.040672, + 0.040569, + 0.039693 + ] + }, + "rss_peak_kb": 11388, + "heap_allocated_kb": 745, + "memory_bytes": 5440 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:21.096734392Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 0.0034000000000000002, + "stddev": 0.0008944271909999159, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0020572, + "stddev": 0.0012774469460607749, + "n": 5, + "samples": [ + 0.004306, + 0.001806, + 0.001548, + 0.001171, + 0.001455 + ] + }, + "rss_peak_kb": 11388, + "heap_allocated_kb": 649, + "memory_bytes": 5440, + "merge_folds_per_sec": { + "mean": 594638.9936792739, + "stddev": 229938.2115084501, + "n": 5, + "samples": [ + 232234.09196470043, + 553709.8560354374, + 645994.8320413437, + 853970.9649871903, + 687285.2233676976 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:21.096740591Z" + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "algorithm": "cms", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.034479, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.034479 + ] + }, + "memory_bytes": 5440, + "accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:31.109513390Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 1054878.7529622247, + "stddev": 13490.593047977407, + "n": 5, + "samples": [ + 1071998.7024527707, + 1041803.6204342695, + 1062802.2044855887, + 1040846.8913182024, + 1056942.3461202923 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 18.163800000000002, + "stddev": 1.6362659319316044, + "n": 5, + "samples": [ + 18.658, + 19.2, + 18.82, + 15.258, + 18.883 + ] + }, + "sys_ms": { + "mean": 0.8, + "stddev": 1.7660239239602618, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 3.959, + 0.041 + ] + } + }, + "wall_time_ms": { + "mean": 18.9620044, + "stddev": 0.2423575070413541, + "n": 5, + "samples": [ + 18.656739, + 19.197476, + 18.818177, + 19.215122, + 18.922508 + ] + }, + "rss_peak_kb": 282740, + "heap_allocated_kb": 243573, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:41.749943048Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 256228.72449741198, + "stddev": 11292.720263634823, + "n": 5, + "samples": [ + 243899.6895915295, + 261289.37523844026, + 259558.75556844866, + 245675.07355413638, + 270720.7285345051 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 3.7236, + "stddev": 0.16319865195521674, + "n": 5, + "samples": [ + 3.905, + 3.645, + 3.67, + 3.877, + 3.521 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 3.7212106, + "stddev": 0.16400413922611823, + "n": 5, + "samples": [ + 3.903244, + 3.64347, + 3.667763, + 3.875037, + 3.516539 + ] + }, + "rss_peak_kb": 282740, + "heap_allocated_kb": 175234, + "memory_bytes": 9960000 + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:41.749948041Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "merge", + "cpu_time_ms": { + "user_ms": { + "mean": 2.3392, + "stddev": 1.377852931194037, + "n": 5, + "samples": [ + 2.201, + 3.36, + 3.061, + 3.074, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.8717999999999999, + "stddev": 1.3566437262597724, + "n": 5, + "samples": [ + 1.268, + 0.0, + 0.0, + 0.0, + 3.091 + ] + } + }, + "wall_time_ms": { + "mean": 3.2096344, + "stddev": 0.1902568303315285, + "n": 5, + "samples": [ + 3.467937, + 3.358821, + 3.059319, + 3.072391, + 3.089704 + ] + }, + "rss_peak_kb": 282740, + "heap_allocated_kb": 77909, + "memory_bytes": 9960000, + "merge_folds_per_sec": { + "mean": 312.416905143808, + "stddev": 18.032344970976638, + "n": 5, + "samples": [ + 288.3558726701206, + 297.7235166744521, + 326.8701302479408, + 325.47940675519493, + 323.6555993713314 + ] + }, + "merge_shards": 2, + "merge_supported": true + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:41.749955645Z" + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "algorithm": "countsketch", + "impl": "lib", + "language": "rust", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 11.657846, + "stddev": 0.0, + "n": 1, + "samples": [ + 11.657846 + ] + }, + "memory_bytes": 9960000, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:29:51.869504061Z" + } + ], + [ + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "insert", + "throughput_items_per_sec": { + "mean": 563610291.179971, + "stddev": 84499627.75809486, + "n": 5, + "samples": [ + 676315433.5181929, + 438943025.19532967, + 556544968.8334817, + 579659739.7327769, + 566588288.6200742 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.037399999999999996, + "stddev": 0.006107372593840989, + "n": 5, + "samples": [ + 0.03, + 0.047, + 0.037, + 0.036, + 0.037 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0361748, + "stddev": 0.005817495397505699, + "n": 5, + "samples": [ + 0.029572, + 0.045564, + 0.035936, + 0.034503, + 0.035299 + ] + }, + "rss_peak_kb": 19340, + "heap_allocated_kb": 3227, + "memory_bytes": 262144 + }, + "source": "cli", + "timestamp": "2026-09-08T16:30:01.921598570Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "throughput", + "operation": "query", + "throughput_items_per_sec": { + "mean": 18649557.421572324, + "stddev": 698936.0781584837, + "n": 5, + "samples": [ + 18541962.877120543, + 17965314.86478836, + 18181123.71567167, + 18799739.331345405, + 19759646.318935636 + ] + }, + "cpu_time_ms": { + "user_ms": { + "mean": 0.0528, + "stddev": 0.0008366600265340761, + "n": 5, + "samples": [ + 0.053, + 0.054, + 0.053, + 0.052, + 0.052 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.0511028, + "stddev": 0.0018689767788819616, + "n": 5, + "samples": [ + 0.051343, + 0.052991, + 0.052362, + 0.050639, + 0.048179 + ] + }, + "rss_peak_kb": 19416, + "heap_allocated_kb": 2095, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:30:01.921611814Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 1, + "bench": { + "metric": "accuracy", + "operation": "query", + "wall_time_ms": { + "mean": 0.045292, + "stddev": 0.0, + "n": 1, + "samples": [ + 0.045292 + ] + }, + "memory_bytes": 290816, + "accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + }, + "source": "cli", + "timestamp": "2026-09-08T16:30:11.936886853Z" + }, + { + "schema_version": 5, + "sketch": "cms", + "algorithm": "cms", + "impl": "polars", + "language": "rust", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "mode": "bench", + "runs": 5, + "bench": { + "metric": "latency", + "operation": "prepare", + "cpu_time_ms": { + "user_ms": { + "mean": 0.7058, + "stddev": 0.008927485648266254, + "n": 5, + "samples": [ + 0.709, + 0.712, + 0.694, + 0.699, + 0.715 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "wall_time_ms": { + "mean": 0.6661268, + "stddev": 0.009004891792797919, + "n": 5, + "samples": [ + 0.670366, + 0.672885, + 0.654097, + 0.659045, + 0.674241 + ] + }, + "rss_peak_kb": 18852, + "heap_allocated_kb": 1857, + "memory_bytes": 290816 + }, + "source": "cli", + "timestamp": "2026-09-08T16:30:49.921276565Z" + } + ] +] diff --git a/tools/empirical-bench/results/planner-evidence.json b/tools/empirical-bench/results/planner-evidence.json new file mode 100644 index 00000000..64486cff --- /dev/null +++ b/tools/empirical-bench/results/planner-evidence.json @@ -0,0 +1,433 @@ +{ + "schema_version": 1, + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", + "model_version": "empirical-update-cpu-v1", + "records": [ + { + "id": "cms-uniform-seed42", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788884847, + "valid_until_unix_seconds": 1791476847, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": null, + "update_cpu_ns": { + "value": 36.64, + "stddev": 2.67240528363495, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "merge_cpu_ns": { + "value": 11599.999999999998, + "stddev": 7924.645102463578, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" + }, + "read_cpu_ns": { + "value": 49.8, + "stddev": 3.114482300479483, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": null, + "disk_bytes": null + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 1.6347221960194194, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + } + } + } + }, + { + "id": "countsketch-uniform-seed42", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "uniform-n20000-c1000-seed42", + "family": "uniform", + "sample_count": 20000, + "distinct_count": 1000, + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788884867, + "valid_until_unix_seconds": 1791476867, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": null, + "update_cpu_ns": { + "value": 1179.19, + "stddev": 36.380478968809676, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "merge_cpu_ns": { + "value": 3321800.0, + "stddev": 97791.615182489, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" + }, + "read_cpu_ns": { + "value": 3813.4, + "stddev": 151.51831572453565, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": null, + "disk_bytes": null + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + }, + { + "id": "cms-zipf-seed42", + "algorithm": "Cms", + "params": { + "Cms": { + "width": 272, + "depth": 5 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788884961, + "valid_until_unix_seconds": 1791476961, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": null, + "update_cpu_ns": { + "value": 35.68, + "stddev": 2.1214971128898594, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "merge_cpu_ns": { + "value": 3400.0, + "stddev": 894.4271909999158, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" + }, + "read_cpu_ns": { + "value": 44.32773109243698, + "stddev": 1.150677641817575, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 5440.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": null, + "disk_bytes": null + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 2.3164860214890104, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + } + } + } + }, + { + "id": "countsketch-zipf-seed42", + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "width": 30000, + "depth": 83 + } + }, + "distribution": { + "id": "zipf-n20000-c1000-seed42", + "family": "zipf", + "sample_count": 20000, + "distinct_count": 952, + "parameters": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + } + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", + "implementation_version": "asap_sketchlib 0.2.2", + "implementation": "asap_sketchlib RegularPath Vector2D", + "id": "c9590114bad98348" + }, + "measured_at_unix_seconds": 1788884981, + "valid_until_unix_seconds": 1791476981, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", + "repetitions": 5 + }, + "metrics": { + "build_cpu_ns": null, + "update_cpu_ns": { + "value": 948.1899999999999, + "stddev": 12.136638743902814, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" + }, + "merge_cpu_ns": { + "value": 3211000.0, + "stddev": 190022.36710450685, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" + }, + "read_cpu_ns": { + "value": 3911.344537815126, + "stddev": 171.42715541514374, + "samples": 5, + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" + }, + "retained_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "peak_bytes": { + "value": 9960000.0, + "stddev": 0.0, + "samples": 5, + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" + }, + "serialized_bytes": null, + "disk_bytes": null + }, + "error": { + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "mean": 0.0, + "max": null, + "trials": 1, + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "query": { + "kind": "point_frequency", + "value_type": "i64", + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + } + } + } + } + ] +} diff --git a/tools/empirical-bench/results/raw.json b/tools/empirical-bench/results/raw.json new file mode 100644 index 00000000..5d66a81f --- /dev/null +++ b/tools/empirical-bench/results/raw.json @@ -0,0 +1,1367 @@ +[ + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 5440, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:27:27.004798255Z", + "insert_throughput_items_per_sec": { + "mean": 27462414.421672627, + "stddev": 2121229.9002417843, + "n": 5, + "samples": [ + 31031952.049427696, + 26920835.24583434, + 25374495.84048577, + 27277277.618584555, + 26707511.35403077 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7328, + "stddev": 0.05344810567269899, + "n": 5, + "samples": [ + 0.645, + 0.745, + 0.79, + 0.734, + 0.75 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7315346, + "stddev": 0.052957671689756146, + "n": 5, + "samples": [ + 0.644497, + 0.742919, + 0.788193, + 0.733211, + 0.748853 + ] + }, + "insert_rss_peak_kb": 11636, + "insert_heap_allocated_kb": 1051, + "query_timestamp": "2026-09-08T16:27:37.016887019Z", + "query_throughput_items_per_sec": { + "mean": 21136707.885741428, + "stddev": 1286805.8474790915, + "n": 5, + "samples": [ + 22205444.775058843, + 20005601.568439163, + 21994457.396736026, + 19484062.03725353, + 21993973.65121957 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0498, + "stddev": 0.0031144823004794846, + "n": 5, + "samples": [ + 0.046, + 0.052, + 0.047, + 0.053, + 0.051 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.047455399999999995, + "stddev": 0.002964145205619997, + "n": 5, + "samples": [ + 0.045034, + 0.049986, + 0.045466, + 0.051324, + 0.045467 + ] + }, + "query_rss_peak_kb": 11636, + "query_heap_allocated_kb": 733, + "merge_timestamp": "2026-09-08T16:27:27.004813199Z", + "merge_folds_per_sec": { + "mean": 275909.67387786397, + "stddev": 296280.2804938654, + "n": 5, + "samples": [ + 56363.43140570398, + 64110.78343377357, + 61001.6470444702, + 638162.0931716656, + 559910.4143337066 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0116, + "stddev": 0.007924645102463582, + "n": 5, + "samples": [ + 0.019, + 0.016, + 0.017, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0106172, + "stddev": 0.00819797570745364, + "n": 5, + "samples": [ + 0.017742, + 0.015598, + 0.016393, + 0.001567, + 0.001786 + ] + }, + "merge_rss_peak_kb": 11636, + "merge_heap_allocated_kb": 637, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 9960000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:27:47.716913903Z", + "insert_throughput_items_per_sec": { + "mean": 848776.7177355861, + "stddev": 25678.34947988661, + "n": 5, + "samples": [ + 809565.9281549908, + 837084.7635798482, + 862354.5833025042, + 873857.5295890344, + 861020.7840515531 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 22.788200000000003, + "stddev": 2.090169060148008, + "n": 5, + "samples": [ + 24.698, + 23.895, + 23.195, + 22.89, + 19.263 + ] + }, + "sys_ms": { + "mean": 0.7956, + "stddev": 1.7734307993265483, + "n": 5, + "samples": [ + 0.01, + 0.0, + 0.0, + 0.0, + 3.968 + ] + } + }, + "insert_wall_time_ms": { + "mean": 23.580925, + "stddev": 0.7274234664406292, + "n": 5, + "samples": [ + 24.704597, + 23.892443, + 23.192316, + 22.887026, + 23.228243 + ] + }, + "insert_rss_peak_kb": 282480, + "insert_heap_allocated_kb": 243573, + "query_timestamp": "2026-09-08T16:27:57.855957080Z", + "query_throughput_items_per_sec": { + "mean": 262769.15824652876, + "stddev": 10337.665821738738, + "n": 5, + "samples": [ + 271225.35002309486, + 264678.5426164215, + 250768.41712216655, + 273759.29549687856, + 253414.18597408233 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "sys_ms": { + "mean": 3.8134, + "stddev": 0.15151831572453558, + "n": 5, + "samples": [ + 3.69, + 3.78, + 3.99, + 3.655, + 3.952 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.810367, + "stddev": 0.15080200586033313, + "n": 5, + "samples": [ + 3.686971, + 3.778168, + 3.987743, + 3.652844, + 3.946109 + ] + }, + "query_rss_peak_kb": 282480, + "query_heap_allocated_kb": 175245, + "merge_timestamp": "2026-09-08T16:27:47.716927415Z", + "merge_folds_per_sec": { + "mean": 301.39109825961305, + "stddev": 9.144410218672732, + "n": 5, + "samples": [ + 316.7997648078546, + 301.0282825102267, + 297.9194497308596, + 298.5947236520762, + 292.6132705970481 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.9908, + "stddev": 1.4396316195471677, + "n": 5, + "samples": [ + 3.158, + 0.0, + 0.0, + 0.0, + 1.796 + ] + }, + "sys_ms": { + "mean": 2.331, + "stddev": 1.501450964900286, + "n": 5, + "samples": [ + 0.0, + 3.324, + 3.358, + 3.351, + 1.622 + ] + } + }, + "merge_wall_time_ms": { + "mean": 3.3203256, + "stddev": 0.0979774039526462, + "n": 5, + "samples": [ + 3.156568, + 3.321947, + 3.356612, + 3.349021, + 3.41748 + ] + }, + "merge_rss_peak_kb": 282480, + "merge_heap_allocated_kb": 77909, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms", + "impl": "polars", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "uniform", + "lower_bound": 0.0, + "upper_bound": 1000.0, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 262144, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:29:00.917715465Z", + "insert_throughput_items_per_sec": { + "mean": 582378449.9780885, + "stddev": 76256068.40887626, + "n": 5, + "samples": [ + 685518423.3076264, + 470278404.8156509, + 582360306.3215212, + 589640024.764881, + 584095090.6807629 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.036000000000000004, + "stddev": 0.005049752469181039, + "n": 5, + "samples": [ + 0.03, + 0.044, + 0.036, + 0.035, + 0.035 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.0348412, + "stddev": 0.004812785388940589, + "n": 5, + "samples": [ + 0.029175, + 0.042528, + 0.034343, + 0.033919, + 0.034241 + ] + }, + "insert_rss_peak_kb": 19412, + "insert_heap_allocated_kb": 3248, + "query_timestamp": "2026-09-08T16:29:10.930037284Z", + "query_throughput_items_per_sec": { + "mean": 19766077.209879298, + "stddev": 1504687.1387838016, + "n": 5, + "samples": [ + 18675880.10084975, + 19261513.56973631, + 18904306.400998145, + 19606305.38781272, + 22382380.589999553 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0524, + "stddev": 0.0027018512172212595, + "n": 5, + "samples": [ + 0.055, + 0.053, + 0.054, + 0.052, + 0.048 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0508084, + "stddev": 0.0035603533953808553, + "n": 5, + "samples": [ + 0.053545, + 0.051917, + 0.052898, + 0.051004, + 0.044678 + ] + }, + "query_rss_peak_kb": 19680, + "query_heap_allocated_kb": 2116, + "merge_timestamp": null, + "merge_shards": null, + "merge_supported": null, + "merge_cpu_time_ms": null, + "merge_wall_time_ms": null, + "merge_rss_peak_kb": null, + "merge_heap_allocated_kb": null, + "prepare_timestamp": "2026-09-08T16:30:39.897095505Z", + "prepare_cpu_time_ms": { + "user_ms": { + "mean": 0.653, + "stddev": 0.014713938969562171, + "n": 5, + "samples": [ + 0.649, + 0.677, + 0.642, + 0.641, + 0.656 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "prepare_wall_time_ms": { + "mean": 0.6191846, + "stddev": 0.011506340504261124, + "n": 5, + "samples": [ + 0.616856, + 0.636202, + 0.609315, + 0.608852, + 0.624698 + ] + }, + "prepare_rss_peak_kb": 18100, + "prepare_heap_allocated_kb": 1834 + }, + { + "schema_version": 5, + "sketch": "cms-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms-regularpath-vector2d", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 5440, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:29:21.096730810Z", + "insert_throughput_items_per_sec": { + "mean": 28162721.602043852, + "stddev": 1809029.758560554, + "n": 5, + "samples": [ + 31390767.975138515, + 27135201.139678445, + 27427355.221277043, + 27439170.78825878, + 27421112.88586647 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.7136, + "stddev": 0.04242994225779712, + "n": 5, + "samples": [ + 0.638, + 0.739, + 0.73, + 0.73, + 0.731 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.7123258, + "stddev": 0.042175054009449736, + "n": 5, + "samples": [ + 0.63713, + 0.73705, + 0.729199, + 0.728885, + 0.729365 + ] + }, + "insert_rss_peak_kb": 11388, + "insert_heap_allocated_kb": 1063, + "query_timestamp": "2026-09-08T16:29:31.109513390Z", + "query_throughput_items_per_sec": { + "mean": 23701944.566575974, + "stddev": 311244.1665571999, + "n": 5, + "samples": [ + 24085412.133785356, + 23567273.177373435, + 23406766.325727772, + 23466193.39890064, + 23984077.797092687 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0422, + "stddev": 0.0010954451150103305, + "n": 5, + "samples": [ + 0.041, + 0.042, + 0.042, + 0.042, + 0.044 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.040171, + "stddev": 0.0005253784350351676, + "n": 5, + "samples": [ + 0.039526, + 0.040395, + 0.040672, + 0.040569, + 0.039693 + ] + }, + "query_rss_peak_kb": 11388, + "query_heap_allocated_kb": 745, + "merge_timestamp": "2026-09-08T16:29:21.096740591Z", + "merge_folds_per_sec": { + "mean": 594638.9936792739, + "stddev": 229938.2115084501, + "n": 5, + "samples": [ + 232234.09196470043, + 553709.8560354374, + 645994.8320413437, + 853970.9649871903, + 687285.2233676976 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 0.0034, + "stddev": 0.0008944271909999159, + "n": 5, + "samples": [ + 0.005, + 0.003, + 0.003, + 0.003, + 0.003 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "merge_wall_time_ms": { + "mean": 0.0020572, + "stddev": 0.0012774469460607749, + "n": 5, + "samples": [ + 0.004306, + 0.001806, + 0.001548, + 0.001171, + 0.001455 + ] + }, + "merge_rss_peak_kb": 11388, + "merge_heap_allocated_kb": 649, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "countsketch-regularpath-vector2d", + "impl": "lib", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "countsketch-regularpath-vector2d", + "params": { + "cols": 30000, + "rows": 83 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 9960000, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:29:41.749943048Z", + "insert_throughput_items_per_sec": { + "mean": 1054878.752962225, + "stddev": 13490.593047977409, + "n": 5, + "samples": [ + 1071998.702452771, + 1041803.6204342695, + 1062802.2044855887, + 1040846.8913182024, + 1056942.3461202923 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 18.1638, + "stddev": 1.6362659319316044, + "n": 5, + "samples": [ + 18.658, + 19.2, + 18.82, + 15.258, + 18.883 + ] + }, + "sys_ms": { + "mean": 0.8, + "stddev": 1.7660239239602618, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 3.959, + 0.041 + ] + } + }, + "insert_wall_time_ms": { + "mean": 18.9620044, + "stddev": 0.2423575070413541, + "n": 5, + "samples": [ + 18.656739, + 19.197476, + 18.818177, + 19.215122, + 18.922508 + ] + }, + "insert_rss_peak_kb": 282740, + "insert_heap_allocated_kb": 243573, + "query_timestamp": "2026-09-08T16:29:51.869504061Z", + "query_throughput_items_per_sec": { + "mean": 256228.724497412, + "stddev": 11292.720263634825, + "n": 5, + "samples": [ + 243899.6895915295, + 261289.37523844023, + 259558.75556844863, + 245675.0735541364, + 270720.7285345051 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 3.7236, + "stddev": 0.16319865195521674, + "n": 5, + "samples": [ + 3.905, + 3.645, + 3.67, + 3.877, + 3.521 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 3.7212106, + "stddev": 0.16400413922611823, + "n": 5, + "samples": [ + 3.903244, + 3.64347, + 3.667763, + 3.875037, + 3.516539 + ] + }, + "query_rss_peak_kb": 282740, + "query_heap_allocated_kb": 175234, + "merge_timestamp": "2026-09-08T16:29:41.749955645Z", + "merge_folds_per_sec": { + "mean": 312.416905143808, + "stddev": 18.03234497097664, + "n": 5, + "samples": [ + 288.3558726701206, + 297.7235166744521, + 326.8701302479408, + 325.47940675519493, + 323.6555993713314 + ] + }, + "merge_shards": 2, + "merge_supported": true, + "merge_cpu_time_ms": { + "user_ms": { + "mean": 2.3392, + "stddev": 1.377852931194037, + "n": 5, + "samples": [ + 2.201, + 3.36, + 3.061, + 3.074, + 0.0 + ] + }, + "sys_ms": { + "mean": 0.8717999999999999, + "stddev": 1.3566437262597724, + "n": 5, + "samples": [ + 1.268, + 0.0, + 0.0, + 0.0, + 3.091 + ] + } + }, + "merge_wall_time_ms": { + "mean": 3.2096344, + "stddev": 0.1902568303315285, + "n": 5, + "samples": [ + 3.467937, + 3.358821, + 3.059319, + 3.072391, + 3.089704 + ] + }, + "merge_rss_peak_kb": 282740, + "merge_heap_allocated_kb": 77909, + "prepare_timestamp": null, + "prepare_cpu_time_ms": null, + "prepare_wall_time_ms": null, + "prepare_rss_peak_kb": null, + "prepare_heap_allocated_kb": null + }, + { + "schema_version": 5, + "sketch": "cms", + "impl": "polars", + "language": "rust", + "mode": "bench", + "runs": 5, + "source": "cli", + "sketch_config": { + "algorithm": "cms", + "params": { + "cols": 272, + "rows": 5 + } + }, + "workload": { + "synthetic": { + "description": { + "column_num": 1, + "column_label": [ + "key" + ], + "column_spec": [ + { + "distribution": { + "kind": "zipf", + "skewness": 1.1, + "population_size": 1000, + "seed": 42 + }, + "special_rule": 0, + "data_type": "i64" + } + ], + "row_num": 20000 + } + } + }, + "memory_bytes": 262144, + "heap_bytes_net": null, + "heap_bytes_peak": null, + "insert_timestamp": "2026-09-08T16:30:01.921598570Z", + "insert_throughput_items_per_sec": { + "mean": 563610291.179971, + "stddev": 84499627.75809486, + "n": 5, + "samples": [ + 676315433.5181929, + 438943025.19532967, + 556544968.8334817, + 579659739.7327769, + 566588288.6200742 + ] + }, + "insert_latency_ns": null, + "insert_cpu_time_ms": { + "user_ms": { + "mean": 0.0374, + "stddev": 0.006107372593840989, + "n": 5, + "samples": [ + 0.03, + 0.047, + 0.037, + 0.036, + 0.037 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "insert_wall_time_ms": { + "mean": 0.0361748, + "stddev": 0.005817495397505699, + "n": 5, + "samples": [ + 0.029572, + 0.045564, + 0.035936, + 0.034503, + 0.035299 + ] + }, + "insert_rss_peak_kb": 19340, + "insert_heap_allocated_kb": 3227, + "query_timestamp": "2026-09-08T16:30:11.936886853Z", + "query_throughput_items_per_sec": { + "mean": 18649557.421572324, + "stddev": 698936.0781584837, + "n": 5, + "samples": [ + 18541962.877120543, + 17965314.86478836, + 18181123.71567167, + 18799739.331345405, + 19759646.318935636 + ] + }, + "query_latency_ns": null, + "query_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "query_cpu_time_ms": { + "user_ms": { + "mean": 0.0528, + "stddev": 0.0008366600265340761, + "n": 5, + "samples": [ + 0.053, + 0.054, + 0.053, + 0.052, + 0.052 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "query_wall_time_ms": { + "mean": 0.0511028, + "stddev": 0.0018689767788819616, + "n": 5, + "samples": [ + 0.051343, + 0.052991, + 0.052362, + 0.050639, + 0.048179 + ] + }, + "query_rss_peak_kb": 19416, + "query_heap_allocated_kb": 2095, + "merge_timestamp": null, + "merge_shards": null, + "merge_supported": null, + "merge_cpu_time_ms": null, + "merge_wall_time_ms": null, + "merge_rss_peak_kb": null, + "merge_heap_allocated_kb": null, + "prepare_timestamp": "2026-09-08T16:30:49.921276565Z", + "prepare_cpu_time_ms": { + "user_ms": { + "mean": 0.7058, + "stddev": 0.008927485648266254, + "n": 5, + "samples": [ + 0.709, + 0.712, + 0.694, + 0.699, + 0.715 + ] + }, + "sys_ms": { + "mean": 0.0, + "stddev": 0.0, + "n": 5, + "samples": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + } + }, + "prepare_wall_time_ms": { + "mean": 0.6661268, + "stddev": 0.009004891792797919, + "n": 5, + "samples": [ + 0.670366, + 0.672885, + 0.654097, + 0.659045, + 0.674241 + ] + }, + "prepare_rss_peak_kb": 18852, + "prepare_heap_allocated_kb": 1857 + } +] diff --git a/tools/empirical-bench/results/replay-uniform.json b/tools/empirical-bench/results/replay-uniform.json new file mode 100644 index 00000000..51a2a3a6 --- /dev/null +++ b/tools/empirical-bench/results/replay-uniform.json @@ -0,0 +1,72556 @@ +{ + "assumptions": { + "data_arrival": "at_rest", + "evaluation_time_ms": 1788825600000, + "evaluations_per_query": 60, + "lifecycle_horizon_seconds": 3600, + "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", + "runtime_capabilities": "hypothetical all supported, no runtime launched", + "timing": "single wall-clock sample; report/materialization timing includes JSON export" + }, + "corpora": [ + { + "name": "o11y_bench", + "runs": [ + { + "accuracy": "Exact", + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 139998327, + "memo_groups": 147, + "mode": "exact", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4911159, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2835596, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2894982, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5407258, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5521000, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3527022, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1857949, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1877251, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1870414, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1857021, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1873167, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1026128, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2880294, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3222728, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2493302, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2236489, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4809448, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5431739, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4755172, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1199703, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2564270, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2268349, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2314772, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4819912, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4784771, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1889647, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1171468, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 19043375, + "selection_ns": 4903446 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 133938923, + "memo_groups": 147, + "mode": "default", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4775948, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2818771, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2828857, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5152425, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5423275, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3484232, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1829054, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1814042, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1809970, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1815448, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1822033, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1021764, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2765277, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3148730, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2450000, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2172139, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4604254, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5259252, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4625196, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1206076, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2501833, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2214503, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2226429, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4622730, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4713808, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1893623, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1176811, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 18958317, + "selection_ns": 4901236 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 133505728, + "memo_groups": 147, + "mode": "empirical", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4737649, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2828146, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2817829, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5138896, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5410059, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3478909, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1829056, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1807307, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1810338, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1798996, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1817237, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1016105, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2762729, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3138971, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2440055, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2170272, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4581888, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5238822, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4610586, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1201123, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2489248, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2204598, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2221488, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4606852, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4644859, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1898089, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1168187, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 18890262, + "selection_ns": 4890102 + } + ], + "source": "repository-vendored grafana/o11y-bench snapshot" + }, + { + "name": "supplemental_sketch_queries", + "runs": [ + { + "accuracy": "Exact", + "coverage_counts": { + "exact_fallback": 2, + "exact_summary_candidate": 1 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 11098488, + "memo_groups": 9, + "mode": "exact", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Exact }" + } + ], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 13102433138774020871, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1384933, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 13102433138774020871, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Exact }" + } + ], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17576251049183068994, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1361050, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17576251049183068994, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Count, Count)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as an exact Count accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Exact }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7632360923926288101, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 1259135, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Count, Count)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Count): row count is independent of input values" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Count))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Count): row count is independent of input values" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 789907, + "selection_ns": 199056 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "sketch_candidate": 3 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 10677348, + "memo_groups": 9, + "mode": "default", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10955175475988740718, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1539398, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.95 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.95 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11077479386785785312, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1517505, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.99 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.99 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12306718525742052945, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 1504768, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Cms))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "PointCount { key: SampleValue, value: None }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 924537, + "selection_ns": 246475 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "sketch_candidate": 3 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 10677844, + "memo_groups": 9, + "mode": "empirical", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10955175475988740718, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1526275, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.95 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.95 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11077479386785785312, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1526459, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.99 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.99 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "measurement": { + "algorithm": "Cms", + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "error": { + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "max": null, + "mean": 1.6347221960194194, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "query": { + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 31.035, + "aae_top1": 25.0, + "aae_top10": 25.9, + "aae_top100": 30.2, + "aae_top1000": 31.035, + "accuracy_runs": 1, + "are_all": 1.6347221960194194, + "are_top1": 0.6097560975609756, + "are_top10": 0.7804431144999306, + "are_top100": 1.079453856854533, + "are_top1000": 1.6347221960194205, + "l1_err": 31035.0, + "l2_err": 1159.3657748959126, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 1.6347221960194194, + "relative_error_p99": 4.733333333333333 + }, + "kind": "point_frequency", + "value_type": "i64" + }, + "trials": 1 + }, + "id": "cms-uniform-seed42", + "measured_at_unix_seconds": 1788884847, + "metrics": { + "build_cpu_ns": null, + "disk_bytes": null, + "merge_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", + "samples": 5, + "stddev": 7924.645102463578, + "value": 11599.999999999998 + }, + "peak_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 5440.0 + }, + "read_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", + "samples": 5, + "stddev": 3.114482300479483, + "value": 49.8 + }, + "retained_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 5440.0 + }, + "serialized_bytes": null, + "update_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", + "samples": 5, + "stddev": 2.67240528363495, + "value": 36.64 + } + }, + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "repetitions": 5, + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" + }, + "valid_until_unix_seconds": 1791476847 + }, + "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", + "status": "matched_configuration" + }, + "sketch": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "measurement": { + "algorithm": "CountSketch", + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "error": { + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "max": null, + "mean": 0.0, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "query": { + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "aae_top1000": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "are_top1000": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 1000.0, + "probes_all": 1000.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "probes_top1000": 1000.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "kind": "point_frequency", + "value_type": "i64" + }, + "trials": 1 + }, + "id": "countsketch-uniform-seed42", + "measured_at_unix_seconds": 1788884867, + "metrics": { + "build_cpu_ns": null, + "disk_bytes": null, + "merge_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", + "samples": 5, + "stddev": 97791.615182489, + "value": 3321800.0 + }, + "peak_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 9960000.0 + }, + "read_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", + "samples": 5, + "stddev": 151.51831572453565, + "value": 3813.4 + }, + "retained_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 9960000.0 + }, + "serialized_bytes": null, + "update_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", + "samples": 5, + "stddev": 36.38047896880968, + "value": 1179.19 + } + }, + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + }, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "repetitions": 5, + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" + }, + "valid_until_unix_seconds": 1791476867 + }, + "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", + "status": "matched_configuration" + }, + "sketch": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12306718525742052945, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 2538112, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Cms))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "PointCount { key: SampleValue, value: None }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 912771, + "selection_ns": 273722 + } + ], + "source": "local supplemental examples, not upstream o11y queries" + } + ], + "empirical_artifact": { + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", + "model_version": "empirical-update-cpu-v1", + "schema_version": 1 + }, + "empirical_context": { + "distribution": { + "distinct_count": 1000, + "family": "uniform", + "id": "uniform-n20000-c1000-seed42", + "parameters": { + "kind": "uniform", + "lower_bound": 0.0, + "seed": 42, + "upper_bound": 1000.0 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788884981 + }, + "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", + "schema_version": 1, + "vendored_fixture_source": { + "note": "existing 27-query local fixture; upstream revision and scenario data were not provided", + "repository": "https://github.com/grafana/o11y-bench", + "upstream_commit": null, + "vendored_snapshot_date": "2026-07-17" + } +} diff --git a/tools/empirical-bench/results/replay-zipf.json b/tools/empirical-bench/results/replay-zipf.json new file mode 100644 index 00000000..e0c324b7 --- /dev/null +++ b/tools/empirical-bench/results/replay-zipf.json @@ -0,0 +1,72550 @@ +{ + "assumptions": { + "data_arrival": "at_rest", + "evaluation_time_ms": 1788825600000, + "evaluations_per_query": 60, + "lifecycle_horizon_seconds": 3600, + "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", + "runtime_capabilities": "hypothetical all supported, no runtime launched", + "timing": "single wall-clock sample; report/materialization timing includes JSON export" + }, + "corpora": [ + { + "name": "o11y_bench", + "runs": [ + { + "accuracy": "Exact", + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 139926864, + "memo_groups": 147, + "mode": "exact", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4881379, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2838791, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2898659, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5395836, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5536637, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3527553, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1854330, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1879353, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1868866, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1869200, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1869809, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1033796, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2874835, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3233151, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2493468, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2234352, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4825075, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5436486, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4755988, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1200510, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2559793, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2278923, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2303288, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4829332, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4777780, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1896495, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1172033, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 18945443, + "selection_ns": 4874737 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 132849589, + "memo_groups": 147, + "mode": "default", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4715711, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2820304, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2818108, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5136004, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5411018, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3480403, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1836535, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1808365, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1811192, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1798842, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1820274, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1018175, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2767902, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3132394, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2439656, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2173357, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4591127, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5241602, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4620909, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1199402, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2493242, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2202658, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2221675, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4603672, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4727445, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1900844, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1172447, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 18860932, + "selection_ns": 4883105 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "exact_fallback": 1, + "exact_summary_candidate": 26 + }, + "lifecycle_raw_fallback_count": 27, + "lowering_ns": 133375526, + "memo_groups": 147, + "mode": "empirical", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 0, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 1, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 2, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 5, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4357565671129963354, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 7022373857605930303, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12714590634108344264, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 11820510057558921127, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 17643830248501223799, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 4724624, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 9, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 10, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 11, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2849346, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15031216406180881087, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 6578125261691327152, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 13772896498538340507, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 456035337168236218, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 14, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.99 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 15, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 16, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", + "rejections": [], + "report_and_materialization_ns": 2824554, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 8595229148929060119, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 9129804314301000689, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1685090337327910000, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 12233764358561311056, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5149178112346058386, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 19, + "heuristic_score": 11.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 20, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 21, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 22, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 25, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 26, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 3, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7328901110799269513, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 16090268644502113127, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7744094383765697368, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 14148027718399404965, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 7166728328935192118, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 3582664093039061079, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "max", + "nullable": true, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", + "rejections": [], + "report_and_materialization_ns": 5129814, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 12504115826368068707, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 6575550222653195469, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + }, + { + "children": [ + 6 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 7, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 7 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 29, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 31, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 32, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 33, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 36, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 37, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 4, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 9 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 891712026667587775, + "id": 10, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 5409691, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 11299207876191563645, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 496299464529929253, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10619967846688283201, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 3452496764162792170, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 1627631988009406521, + "id": 9, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 9 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 40, + "heuristic_score": 8.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 42, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "HistogramQuantile { q: 0.95 }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 43, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 44, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 5, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 5508770796471375213, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 6 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", + "rejections": [], + "report_and_materialization_ns": 3481021, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_request_duration_seconds_bucket" + } + } + }, + "hash": 5852869092542749055, + "id": 0, + "kind": "Scan", + "label": "Scan(http_request_duration_seconds_bucket)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12002040721701933139, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 545686775099239971, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 3 + ] + } + }, + "hash": 6755468574470158960, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "le", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "histogram_quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1802411125531425629, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 6280156848725840269, + "id": 5, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "histogram_quantile", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 47, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 6, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3880761932090503464, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", + "rejections": [], + "report_and_materialization_ns": 1836509, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 43200 + } + }, + "hash": 10235208320742681127, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(43200s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 50, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 7, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9573669344271708315, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1807818, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11978611282698443115, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 10428696925252998572, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 53, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 8, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4409576069948584546, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1816769, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 11637948610861789279, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 11026529439620961456, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 56, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 9, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12439492146068972559, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", + "rejections": [], + "report_and_materialization_ns": 1800697, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_retry_queue_depth" + } + } + }, + "hash": 4732210068802657336, + "id": 0, + "kind": "Scan", + "label": "Scan(service_retry_queue_depth)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7844522547549742019, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(MinMax, MinMax)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 59, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Max { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 61, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 10, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "max" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4807022209435798463, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", + "rejections": [], + "report_and_materialization_ns": 1822384, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + }, + "resolution": { + "nanos": 0, + "secs": 60 + } + }, + "hash": 12477000640617829860, + "id": 2, + "kind": "PromqlSubquery", + "label": "PromqlSubquery", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(PromqlSubquery)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(MinMax, MinMax)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(MinMax))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(MinMax)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_extremum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 11, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", + "rejections": [], + "report_and_materialization_ns": 1018883, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "user-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_cache_refresh_lag_seconds" + } + } + }, + "hash": 13418213253981176398, + "id": 0, + "kind": "Scan", + "label": "Scan(service_cache_refresh_lag_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 12, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", + "rejections": [], + "report_and_materialization_ns": 2767764, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [ + 3 + ], + "detail": { + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [] + }, + "hash": 13146525486139638535, + "id": 4, + "kind": "Sort", + "label": "Sort(1 keys)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Sort)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 70, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 71, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 13, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", + "rejections": [], + "report_and_materialization_ns": 3138399, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 4555860453844271455, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 17695627245133327338, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17745976529714442724, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 3931161581219847493, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + }, + { + "children": [], + "detail": { + "value": { + "Literal": { + "Float64": 0.0 + } + } + }, + "hash": 17462177484913004457, + "id": 4, + "kind": "PromqlScalarBridge", + "label": "PromqlScalarBridge(Literal(Float64(0.0)))", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 4 + ], + "detail": { + "op": ">", + "vector_match": null + }, + "hash": 18310621160903535696, + "id": 5, + "kind": "BinaryOp", + "label": "BinaryOp(>)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 5 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 65, + "heuristic_score": 5.0, + "rank": 1, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 2, + "families": [], + "group": 65, + "heuristic_score": 8.0, + "rank": 2, + "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 66, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 66, + "heuristic_score": 3.0, + "rank": 2, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 67, + "heuristic_score": 2.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 0, + "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [], + "group": 68, + "heuristic_score": 1.0, + "rank": 1, + "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", + "score_unit": "dimensionless_not_cpu", + "strategy": "SharedSubtreeStrategy", + "target_intent": null + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 14, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2442837, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 13384239780302736870, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1183070750704153722, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9522808892276299504, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [ + 2 + ] + } + }, + "hash": 6142901349248432701, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 75, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [], + "group": 76, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Avg { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 15, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5813513527114420555, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 2172394, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": ".+" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 17194998456257326742, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 1075205487120003937, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "avg" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9474605074443102262, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 79, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 80, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 81, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 84, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 85, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 16, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11735334010684667017, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 11500554457586818971, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10981797669010455262, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 8187023580477152099, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10943211217549070051, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", + "rejections": [], + "report_and_materialization_ns": 4578340, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12213285741126836261, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 8706897440781054898, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 434355548163614257, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 86400 + } + }, + "hash": 15214932053778948030, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(86400s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 88, + "heuristic_score": 12.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 89, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 90, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 94, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 95, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 17, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 9544619250709110764, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4752197667737580647, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 5, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 6, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 7, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 7 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 2621875301365032242, + "id": 8, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 8 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 2918023599440896380, + "id": 9, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 4, + 9 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 8305651657190921739, + "id": 10, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 10 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", + "rejections": [], + "report_and_materialization_ns": 5239630, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 2044130390646347630, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 16542072202864268241, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 21600000 + } + }, + "hash": 1517877614886195588, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2093660087192948056, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 99, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 100, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 101, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 104, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Increase, Increase)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 105, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Increase" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 18, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18023644529753260288, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 5937562834316033068, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "increase" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 4165756548983382920, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6686132277608031880, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 1269350165958096221, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4611045, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 12030228385769071755, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 2812935849703566685, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 8107691065169312504, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 13836124465410210916, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Increase, Increase)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Increase))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Increase)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 108, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 19, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9372206061583279877, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(process_resident_memory_bytes)", + "rejections": [], + "report_and_materialization_ns": 1201059, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_resident_memory_bytes" + } + } + }, + "hash": 6676969730373822799, + "id": 0, + "kind": "Scan", + "label": "Scan(process_resident_memory_bytes)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 110, + "heuristic_score": 6.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 111, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 20, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 14415705963064318307, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 3 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4208478163633478013, + "id": 4, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 4 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", + "rejections": [], + "report_and_materialization_ns": 2495514, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "shift": { + "at": null, + "offset_ms": 3600000 + } + }, + "hash": 10500837375405899682, + "id": 1, + "kind": "TimeShift", + "label": "TimeShift", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 1486896920371848857, + "id": 2, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 115, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 116, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 21, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 18241937131606632585, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14348921228394859642, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2201556, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Eq", + "right": { + "Literal": { + "Utf8": "order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 796076758948336469, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 14876166126776615318, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 119, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 120, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 22, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 336986289356308188, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 9900411588081570671, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", + "rejections": [], + "report_and_materialization_ns": 2220064, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 5359373914941924135, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 123, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 124, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 125, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 128, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 129, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 23, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 3881266545830301987, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 6995895710432326019, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1762460255519483571, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 16564289612874067248, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 10680303411019709277, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", + "rejections": [], + "report_and_materialization_ns": 4610344, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 15342092518330887510, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7395377925094412003, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "payment-service|order-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 5749788076224562384, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 21600 + } + }, + "hash": 7382319287546055848, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(21600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 132, + "heuristic_score": 10.0, + "rank": 0, + "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": null + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 133, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 134, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 137, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 138, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 24, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7050167201471182651, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 10093052610277408880, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 4, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 4 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 5, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 5 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 15590150853126623828, + "id": 6, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 6 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 4278979949001944744, + "id": 7, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + }, + { + "children": [ + 3, + 7 + ], + "detail": { + "op": "/", + "vector_match": null + }, + "hash": 11062556003957310113, + "id": 8, + "kind": "BinaryOp", + "label": "BinaryOp(/)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 8 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(BinaryOp)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", + "rejections": [], + "report_and_materialization_ns": 4647886, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + }, + { + "Compare": { + "left": { + "Column": 3 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "5.." + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 11885727537787269845, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 10604569320146733947, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": "utf8", + "name": "status", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [ + { + "Compare": { + "left": { + "Column": 2 + }, + "op": "Regex", + "right": { + "Literal": { + "Utf8": "user-service|order-service|payment-service" + } + } + } + } + ], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } + }, + "hash": 13514739729584015198, + "id": 0, + "kind": "Scan", + "label": "Scan(http_requests_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 8000143351567832311, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + }, + { + "dtype": "utf8", + "name": "job", + "nullable": true, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 3, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 3 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 4, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 4 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 5, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + }, + { + "children": [ + 2, + 5 + ], + "detail": { + "kind": "Arithmetic(Div)", + "vector_match": null + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + }, + "id": 6, + "kind": "SummaryBinaryOp", + "label": "BinaryOp(Arithmetic(Div))" + } + ], + "root": 6 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "BinaryOp over exact operands" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + }, + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 141, + "heuristic_score": 5.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Rate, Rate)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 142, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Rate" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 25, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "kind": "rate" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 1520923597163513092, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 2 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 14769397965332712593, + "id": 3, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 3 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(rate(process_cpu_seconds_total[1h]))", + "rejections": [], + "report_and_materialization_ns": 1900553, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "process_cpu_seconds_total" + } + } + }, + "hash": 15568127014347136337, + "id": 0, + "kind": "Scan", + "label": "Scan(process_cpu_seconds_total)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 3600 + } + }, + "hash": 14319743876036373276, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(3600s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Rate, Rate)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Rate))" + }, + { + "children": [ + 1 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 2, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Rate)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "constant": null, + "op": "lipschitz" + }, + "rule": "exact_input" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Sum, Sum)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 145, + "heuristic_score": 3.0, + "rank": 0, + "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Sum { col: None }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 26, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "having": null, + "measures": [ + { + "col": null, + "kind": "sum" + } + ], + "output_names": [ + "" + ], + "reduction": { + "Reduce": [] + } + }, + "hash": 1513406633472048957, + "id": 1, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": true, + "columns": [ + { + "dtype": "float64", + "name": "sum", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "sum(up)", + "rejections": [], + "report_and_materialization_ns": 1167399, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "up" + } + } + }, + "hash": 5514360871380360673, + "id": 0, + "kind": "Scan", + "label": "Scan(up)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 0 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Scan)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Sum, Sum)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": { + "Reduce": [] + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Sum))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Sum)" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "exact_sum" + }, + "rule": "exact_input" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 27, + "search_ns": 18861143, + "selection_ns": 4884093 + } + ], + "source": "repository-vendored grafana/o11y-bench snapshot" + }, + { + "name": "supplemental_sketch_queries", + "runs": [ + { + "accuracy": "Exact", + "coverage_counts": { + "exact_fallback": 2, + "exact_summary_candidate": 1 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 11045392, + "memo_groups": 9, + "mode": "exact", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Exact }" + } + ], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 13102433138774020871, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1376397, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 13102433138774020871, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Exact }" + } + ], + "coverage": "exact_fallback", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17576251049183068994, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1362872, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 17576251049183068994, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "ExactAggregate(Count, Count)", + "is_sketch": false, + "offline_evidence": { + "reason": "offline sketch evidence does not cost exact operators", + "status": "unavailable" + }, + "sketch": null + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as an exact Count accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Exact }" + } + ], + "coverage": "exact_summary_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": "Exact", + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 7632360923926288101, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 1264121, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "ExactAggregate(Count, Count)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Count): row count is independent of input values" + } + ] + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(ExactAggregate(Count))" + } + ], + "root": 1 + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "ExactAggregate(Count): row count is independent of input values" + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 771269, + "selection_ns": 195148 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "sketch_candidate": 3 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 10671302, + "memo_groups": 9, + "mode": "default", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10955175475988740718, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1545873, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.95 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.95 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11077479386785785312, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1516511, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.99 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.99 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no empirical provider in this mode", + "status": "unavailable" + }, + "sketch": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12306718525742052945, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 1512397, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Cms))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "PointCount { key: SampleValue, value: None }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 919100, + "selection_ns": 243013 + }, + { + "accuracy": { + "Epsilon": 0.01 + }, + "coverage_counts": { + "sketch_candidate": 3 + }, + "lifecycle_raw_fallback_count": 3, + "lowering_ns": 10663641, + "memo_groups": 9, + "mode": "empirical", + "queries": [ + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 0, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 0, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.95 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 10955175475988740718, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.95, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1532522, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.95 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.95 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.95 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "Kll", + "params": { + "Kll": { + "k": 269 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "reason": "no measurement for algorithm and exact configuration", + "status": "unavailable" + }, + "sketch": { + "algorithm": "DDSketch", + "params": { + "DDSketch": { + "alpha": 0.01 + } + } + } + } + ], + "group": 3, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 1, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "col": null, + "kind": "quantile", + "q": 0.99 + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 11077479386785785312, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "quantile_over_time(0.99, service_latency_seconds[5m])", + "rejections": [], + "report_and_materialization_ns": 1528568, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "service_latency_seconds" + } + } + }, + "hash": 3772802540453699306, + "id": 0, + "kind": "Scan", + "label": "Scan(service_latency_seconds)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 12277718898064577625, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Kll))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "Quantile { q: 0.99 }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(Quantile { q: 0.99 })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009966065608321138 + }, + "failure_probability": { + "op": "constant", + "value": 0.01 + }, + "metric": "rank", + "provenance": [ + { + "algorithm": "Kll", + "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", + "kind": "sketch_readout", + "params": { + "Kll": { + "k": 269 + } + }, + "query": "Quantile { q: 0.99 }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + }, + { + "candidates": [ + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "measurement": { + "algorithm": "Cms", + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "error": { + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "max": null, + "mean": 2.3164860214890104, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "query": { + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 7.493697478991597, + "aae_top1": 4.0, + "aae_top10": 4.8, + "aae_top100": 6.49, + "accuracy_runs": 1, + "are_all": 2.3164860214890104, + "are_top1": 0.001122334455667789, + "are_top10": 0.007748825239549779, + "are_top100": 0.14834226869635583, + "l1_err": 7134.0, + "l2_err": 324.8969067258105, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 2.3164860214890104, + "relative_error_p99": 16.0 + }, + "kind": "point_frequency", + "value_type": "i64" + }, + "trials": 1 + }, + "id": "cms-zipf-seed42", + "measured_at_unix_seconds": 1788884961, + "metrics": { + "build_cpu_ns": null, + "disk_bytes": null, + "merge_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", + "samples": 5, + "stddev": 894.4271909999158, + "value": 3400.0 + }, + "peak_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 5440.0 + }, + "read_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", + "samples": 5, + "stddev": 1.150677641817575, + "value": 44.32773109243698 + }, + "retained_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 5440.0 + }, + "serialized_bytes": null, + "update_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", + "samples": 5, + "stddev": 2.121497112889859, + "value": 35.68 + } + }, + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "repetitions": 5, + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" + }, + "valid_until_unix_seconds": 1791476961 + }, + "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", + "status": "matched_configuration" + }, + "sketch": { + "algorithm": "Cms", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 0, + "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + }, + { + "consumer_count": 1, + "families": [ + { + "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", + "is_sketch": true, + "offline_evidence": { + "measurement": { + "algorithm": "CountSketch", + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "error": { + "ground_truth_method": "exact offline HashMap counts; every distinct key probed", + "max": null, + "mean": 0.0, + "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", + "query": { + "accuracy_stddev": null, + "full_accuracy": { + "aae_all": 0.0, + "aae_top1": 0.0, + "aae_top10": 0.0, + "aae_top100": 0.0, + "accuracy_runs": 1, + "are_all": 0.0, + "are_top1": 0.0, + "are_top10": 0.0, + "are_top100": 0.0, + "l1_err": 0.0, + "l2_err": 0.0, + "probes": 952.0, + "probes_all": 952.0, + "probes_top1": 1.0, + "probes_top10": 10.0, + "probes_top100": 100.0, + "relative_error_mean": 0.0, + "relative_error_p99": 0.0 + }, + "kind": "point_frequency", + "value_type": "i64" + }, + "trials": 1 + }, + "id": "countsketch-zipf-seed42", + "measured_at_unix_seconds": 1788884981, + "metrics": { + "build_cpu_ns": null, + "disk_bytes": null, + "merge_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", + "samples": 5, + "stddev": 190022.36710450685, + "value": 3211000.0 + }, + "peak_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 9960000.0 + }, + "read_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", + "samples": 5, + "stddev": 171.42715541514374, + "value": 3911.344537815126 + }, + "retained_bytes": { + "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", + "samples": 5, + "stddev": 0.0, + "value": 9960000.0 + }, + "serialized_bytes": null, + "update_cpu_ns": { + "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", + "samples": 5, + "stddev": 12.136638743902814, + "value": 948.19 + } + }, + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + }, + "provenance": { + "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", + "dataset": "deterministic synthetic i64 frequency stream, seed 42", + "repetitions": 5, + "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" + }, + "valid_until_unix_seconds": 1791476981 + }, + "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", + "status": "matched_configuration" + }, + "sketch": { + "algorithm": "CountSketch", + "params": { + "CountSketch": { + "depth": 83, + "width": 30000 + } + } + } + } + ], + "group": 6, + "heuristic_score": 4.0, + "rank": 1, + "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", + "score_unit": "dimensionless_not_cpu", + "strategy": "SketchAlgorithmStrategy", + "target_intent": "Count { accuracy: Epsilon(0.01) }" + } + ], + "coverage": "sketch_candidate", + "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", + "estimated_end_to_end_cpu_savings": null, + "estimated_end_to_end_memory_savings": null, + "index": 2, + "lifecycle_plan": { + "deployments": [], + "evaluation_rate_per_second": null, + "expected_reads": 60.0, + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 1 + ], + "detail": { + "having": null, + "measures": [ + { + "accuracy": { + "Epsilon": 0.01 + }, + "kind": "count" + } + ], + "output_names": [ + "" + ], + "reduction": "PerEntity" + }, + "hash": 12306718525742052945, + "id": 2, + "kind": "Aggregate", + "label": "Aggregate(1 measures)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 2 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(Aggregate)" + } + ], + "root": 0 + }, + "horizon_seconds": 3600.0, + "raw_recompute_total_cost": null, + "selected_raw_recompute": true, + "summary_total_cost": null, + "update_rate_per_second": null + }, + "query": "count_over_time(offline_frequency_metric[5m])", + "rejections": [], + "report_and_materialization_ns": 2479967, + "root_plan": { + "graph": { + "nodes": [ + { + "children": [], + "detail": { + "pre_asap_subgraph": { + "nodes": [ + { + "children": [], + "detail": { + "predicates": [], + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + }, + "source": { + "TimeSeries": { + "metric": "offline_frequency_metric" + } + } + }, + "hash": 11537732429103736602, + "id": 0, + "kind": "Scan", + "label": "Scan(offline_frequency_metric)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + }, + { + "children": [ + 0 + ], + "detail": { + "range": { + "nanos": 0, + "secs": 300 + } + }, + "hash": 15919080798212461028, + "id": 1, + "kind": "TimeRange", + "label": "TimeRange(300s)", + "schema": { + "closed": false, + "columns": [ + { + "dtype": "timestamp", + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": "float64", + "name": "value", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [] + } + } + ], + "root": 1 + } + }, + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "id": 0, + "kind": "KeepPreAsap", + "label": "KeepPreAsap(TimeRange)" + }, + { + "children": [ + 0 + ], + "detail": { + "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + } + }, + "reduction": "PerEntity" + }, + "id": 1, + "kind": "SummaryAgg", + "label": "SummaryAgg(Sketch(Cms))" + }, + { + "children": [ + 1 + ], + "detail": { + "query": "PointCount { key: SampleValue, value: None }" + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + }, + "id": 2, + "kind": "SummaryEstimate", + "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" + } + ], + "root": 2 + }, + "guarantee": { + "bound": { + "op": "constant", + "value": 0.009993683192864136 + }, + "failure_probability": { + "op": "constant", + "value": 0.006737946999085467 + }, + "metric": "frequency", + "provenance": [ + { + "algorithm": "Cms", + "contract": "count_min_l1_markov_v1", + "kind": "sketch_readout", + "params": { + "Cms": { + "depth": 5, + "width": 272 + } + }, + "query": "PointCount { key: SampleValue, value: None }" + }, + { + "guarantee": { + "bound": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute_value", + "provenance": [ + { + "kind": "exact", + "reason": "KeepPreAsap" + } + ] + }, + "input_index": 0, + "kind": "child_guarantee" + }, + { + "kind": "composition_step", + "operator": { + "op": "approximate_aggregate" + }, + "rule": "exact_input" + }, + { + "kind": "accuracy_target", + "target": { + "Epsilon": 0.01 + } + } + ] + } + }, + "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" + } + ], + "query_count": 3, + "search_ns": 907683, + "selection_ns": 272232 + } + ], + "source": "local supplemental examples, not upstream o11y queries" + } + ], + "empirical_artifact": { + "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", + "model_version": "empirical-update-cpu-v1", + "schema_version": 1 + }, + "empirical_context": { + "distribution": { + "distinct_count": 952, + "family": "zipf", + "id": "zipf-n20000-c1000-seed42", + "parameters": { + "kind": "zipf", + "population_size": 1000, + "seed": 42, + "skewness": 1.1 + }, + "sample_count": 20000 + }, + "environment": { + "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", + "id": "c9590114bad98348", + "implementation": "asap_sketchlib RegularPath Vector2D", + "implementation_version": "asap_sketchlib 0.2.2", + "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", + "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" + }, + "now_unix_seconds": 1788884981 + }, + "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", + "schema_version": 1, + "vendored_fixture_source": { + "note": "existing 27-query local fixture; upstream revision and scenario data were not provided", + "repository": "https://github.com/grafana/o11y-bench", + "upstream_commit": null, + "vendored_snapshot_date": "2026-07-17" + } +} From 152ca6cb71fc11a8c38d93e69c9fd7dca682f03b Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:25:16 -0600 Subject: [PATCH 5/9] docs: use English evaluation reports and fix module formatting --- crates/asap-aware-mapping/src/lib.rs | 2 +- docs/offline-o11y-evaluation-2026-09-08.md | 192 ++++++++++++--------- docs/offline-o11y-final-2026-09-08.md | 135 ++++++++------- 3 files changed, 184 insertions(+), 145 deletions(-) diff --git a/crates/asap-aware-mapping/src/lib.rs b/crates/asap-aware-mapping/src/lib.rs index 9c45b397..d7c2586d 100644 --- a/crates/asap-aware-mapping/src/lib.rs +++ b/crates/asap-aware-mapping/src/lib.rs @@ -185,8 +185,8 @@ pub mod accuracy; pub mod accuracy_reconciliation; pub mod analytical_cost; pub mod cost_model; -pub mod empirical_cost; pub mod empirical_comparison; +pub mod empirical_cost; pub mod explanation; pub mod grouping; pub mod physical_operator_statistics; diff --git a/docs/offline-o11y-evaluation-2026-09-08.md b/docs/offline-o11y-evaluation-2026-09-08.md index 083ff87b..c3f5b0f2 100644 --- a/docs/offline-o11y-evaluation-2026-09-08.md +++ b/docs/offline-o11y-evaluation-2026-09-08.md @@ -1,111 +1,135 @@ -# 离线 sketch 证据接入与 o11y 规划评估 +# Offline Sketch Evidence Integration and o11y Planning Evaluation -> 本文保留第一轮实验的历史状态(包括当时未提交、24/27 绑定以及未测构造/磁盘)。 -> 后续实现、最终结果和交付状态以 [最终报告](offline-o11y-final-2026-09-08.md) 为准。 +> This document preserves the historical state of the first experiment, including +> its uncommitted changes, 24/27 binding result, and unmeasured construction/disk costs. +> See the [final report](offline-o11y-final-2026-09-08.md) for subsequent implementation, +> final results, and delivery status. -## 执行结果 +## Execution Results -三个 agent 并行完成了离线证据 provider、真实 sketch-bench 测量和 -planner replay;主 agent 完成 control-plane 接入、版本兼容和集成验证。 -完整步骤见 [执行计划](design_docs/empirical-o11y-execution-plan.md)。 +Three agents worked in parallel on the offline evidence provider, real sketch-bench +measurements, and planner replay. The main agent completed control-plane integration, +version compatibility, and integration validation. See the +[execution plan](design_docs/empirical-o11y-execution-plan.md) for the full sequence. -实现与测量使用独立 worktree,原有工作区的冲突和修改未动: +Implementation and measurements used isolated worktrees. Existing conflicts and +changes in the original workspace were left untouched: -- Planner:`/mydata/asapplanner-empirical-o11y`,基线 `378a754`。 -- Control plane:`/mydata/ASAPQuery-backend/.worktrees/empirical-o11y-322`,基线 `95131d8`。 -- sketch-bench:`/mydata/sketch-bench-empirical-322`,固定 `87f619e843fd2e4da784160d4e205a0d0d55f032`,源码未修改。 +- Planner: `/mydata/asapplanner-empirical-o11y`, baseline `378a754`. +- Control plane: `/mydata/ASAPQuery-backend/.worktrees/empirical-o11y-322`, baseline `95131d8`. +- sketch-bench: `/mydata/sketch-bench-empirical-322`, pinned to `87f619e843fd2e4da784160d4e205a0d0d55f032`, with no source changes. -没有提交、推送、发布 PR 或关闭 issue。两个产品 worktree 的改动仍可本地审查。 +No commits, pushes, PRs, or issue closures had been made at this stage. Changes in +both product worktrees remained available for local review. -## #322 已实现的路径 +## Implemented Path for #322 -1. 版本化 JSON artifact、JSON Schema、显式标注的合成测试 fixture,以及真实测量文件。 -2. 离线误差、CPU、内存、分布、精确参数、运行环境、样本数、离散程度、有效期和来源信息。 -3. 公共 `CostModel` 的测量排序接口,以及 control plane 对其实际 sizing 参数的证据查找。 -4. 全部候选都有匹配的 update CPU 证据时按该指标排序;缺失、过期、配置/环境/分布不匹配或歧义时保留默认顺序。 -5. 测试证明改变兼容证据会改变真实绑定结果,同时保持参数与准确率保证;实际测量支持默认 CMS 优先,未人为制造收益或决策变化。 +1. A versioned JSON artifact, JSON Schema, explicitly labeled synthetic test fixture, and real measurement files. +2. Offline error, CPU, memory, distribution, exact parameters, environment, sample counts, variability, validity periods, and provenance. +3. An evidence-based ranking interface on the public `CostModel`, plus control-plane evidence lookup using its actual sizing parameters. +4. Ranking by update CPU when all candidates have compatible measurements; default ordering is preserved for missing, expired, ambiguous, or configuration/environment/distribution-incompatible evidence. +5. Tests showing that changing compatible evidence changes actual binding while preserving parameters and accuracy guarantees. Real measurements support the default CMS preference; no benefit or decision change was manufactured. -这次排序目标是单次更新 CPU,不是 CPU、内存、磁盘的综合最优目标。 -离线误差保留为对应查询的观测,不升级为形式化保证,也不直接用来缩小 sketch。 -生命周期接口只提供有依据的部分成本;缺少语义匹配的 readout、retention、retirement -或 raw/residual 成本时,完整方案仍不可估计。实时 ground truth、自估误差和在线反馈均不在本次范围内。 +This ranking minimizes per-update CPU, rather than a combined CPU/memory/disk +objective. Offline errors remain observations for their corresponding queries; +they are neither promoted to formal guarantees nor used directly to shrink sketches. +The lifecycle interface exposes only supported partial costs. A complete plan +remains unestimable when semantically matched readout, retention, retirement, or +raw/residual costs are missing. Realtime ground truth, self-estimated error, and +online feedback are outside this experiment's scope. -## 数据与测量 +## Data and Measurements -使用真正的 sketch-bench,比较 CMS、CountSketch 和 Polars group-by + HashMap -精确频率索引。每个数据集有 20,000 个 i64 key,生成 key 空间为 1,000,seed=42; -uniform 实际 1,000 个 distinct key,Zipf(指数 1.1)实际 952 个。 -CPU 每项 5 次测量、2 次预热;误差来自每个固定数据集的一次离线准确率实验。 +The real sketch-bench compares CMS, CountSketch, and an exact Polars group-by + +HashMap frequency index. Each dataset contains 20,000 i64 keys drawn from a +key-space of 1,000 with seed 42. Uniform contains 1,000 distinct keys; Zipf +(exponent 1.1) contains 952. Each CPU measurement has five runs after two warmups. +Errors come from one offline accuracy experiment on each fixed dataset. -| 分布/算法 | 更新 CPU(ns/item) | 读 CPU(ns/key) | retained/peak requested heap | 平均绝对相对频率误差 | +| Distribution / algorithm | Update CPU (ns/item) | Read CPU (ns/key) | Retained / peak requested heap | Mean absolute relative frequency error | | --- | ---: | ---: | ---: | ---: | | Uniform CMS | 36.64 | 49.80 | 5,440 B | 163.47% | -| Uniform CountSketch | 1,179.19 | 3,813.40 | 9,960,000 B | 0(该离线样本) | +| Uniform CountSketch | 1,179.19 | 3,813.40 | 9,960,000 B | 0 (this offline sample) | | Zipf CMS | 35.68 | 44.33 | 5,440 B | 231.65% | -| Zipf CountSketch | 948.19 | 3,911.34 | 9,960,000 B | 0(该离线样本) | +| Zipf CountSketch | 948.19 | 3,911.34 | 9,960,000 B | 0 (this offline sample) | -CMS 参数为 272 × 5,CountSketch 为 30,000 × 83。CMS 的 additive epsilon -约束以流量总量为基准,并非每个 key 的 1% 相对误差约束,不能把上表误差解释为满足后者。 -CountSketch 的零观测误差也不保证其他数据上的误差为零。 +CMS uses parameters 272 × 5; CountSketch uses 30,000 × 83. CMS's additive epsilon +bound is relative to total stream mass, not a 1% relative-error bound for each key. +The errors above must not be interpreted as satisfying the latter. CountSketch's +zero observed error does not guarantee zero error on other data. -内存由独立存活对象探针测量,统计申请的堆字节,不包含输入数据、分配器页开销或整个进程 RSS。 -CPU 与内存探针的分配器差异有单独说明。磁盘、序列化大小和空 sketch 构造 CPU 未测量,保持 null。 +Memory is measured with an independent live-object probe that counts requested +heap bytes, excluding input data, allocator page overhead, and whole-process RSS. +Allocator differences between the CPU and memory probes are documented separately. +Disk usage, serialized size, and empty-sketch construction CPU were unmeasured +at this stage and remain null in this historical run. -对加载这些数据后执行 1,000 次 point-frequency 查询,已测 CPU 分项之和如下: +For 1,000 point-frequency queries after loading these datasets, the measured CPU +components sum to: -| 数据 | CMS | 精确索引 | CountSketch | +| Dataset | CMS | Exact index | CountSketch | | --- | ---: | ---: | ---: | | Uniform | 0.783 ms | 0.741 ms | 27.397 ms | | Zipf | 0.758 ms | 0.799 ms | 22.875 ms | -这是含精确索引 prepare 的离线分项估算,未包含未测量的 sketch 构造。 -因此不能报告完整 break-even 或部署后的加速比。精确索引的状态大小 290,816 B -来自上游公式,也不能与 requested heap 的差额称作实测整体内存节省。 -详见 [测量报告及原始数据](../tools/empirical-bench/results/MEASUREMENTS.md)。 +These are offline component estimates that include exact-index preparation but +exclude unmeasured sketch construction. They therefore cannot establish a complete +break-even point or deployed speedup. The exact index's 290,816 B state footprint +comes from an upstream formula; its difference from requested heap must not be +called a measured reduction in total memory. See the +[measurement report and raw data](../tools/empirical-bench/results/MEASUREMENTS.md). -## o11y 结果 +## o11y Results -使用仓库已有的 27 条 PromQL fixture;这是 2026-07-17 的 vendored snapshot, -Git blob 为 `ea2eee98d78c5c9354363dc378303d98ac141672`,没有可证实的上游 commit。 -这次没有运行上游 LLM-agent 评分,也没有测量 o11y 真实数据分布。 +The evaluation uses the repository's existing 27 PromQL fixtures: a vendored +snapshot from 2026-07-17, Git blob `ea2eee98d78c5c9354363dc378303d98ac141672`, +without a verifiable upstream commit. This experiment did not run the upstream +LLM-agent scoring benchmark or measure a real o11y data distribution. -| 检查层 | 结果 | +| Evaluation layer | Result | | --- | --- | -| Planner 查询候选覆盖 | 26/27 有精确摘要候选,1/27 原始回退;0/27 有近似 sketch 候选 | -| Planner 完整生命周期选择 | 27/27 保守 raw 回退,完整物理成本证据不足 | -| Control-plane parser + typed binder | exact/default/empirical 各 24/27 绑定成功、3/27 拒绝 | -| 独立补充查询 | 两条 quantile、一条 count_over_time;default/empirical 均可产生 sketch 候选 | -| 测量匹配 | count_over_time 的 CMS/CountSketch 配置匹配更新成本;quantile 缺少测量 | - -Control-plane 拒绝的三种形式是裸指标选择、`sort_desc(...)` 和 `... > 0`。 -它们不是 parser 失败;当前 typed binder 没有对应可绑定的根候选。 -成功绑定也不等于可部署执行,部分绑定结果仍是原始查询回退。 -为接通新版 Planner,补充了 Concat 元数据处理和 Summary BinaryOp 兼容; -warm tier 尚不能执行的二元运算保持显式 fallback。 - -实测证据没有改变 o11y 选择,因为这些查询没有对应 sketch 候选。 -补充查询的 CMS update CPU 明显较低,测量排序保持 CMS 在前。 -离线 point-frequency 误差不被当作 count_over_time 或 o11y 结果误差。 - -完整查询 CPU/内存收益均为 null。下一阶段要量化 o11y 收益,需要精确摘要及 raw/residual -算子在对应 metric 数据、group cardinality、窗口和执行频率下的测量,随后接入完整物理成本比较。 -仅增加 sketch 算法测量不能填补这些输入。 - -## 验证与复现 - -- Planner mapping 单元测试:342 项通过。 -- Planner replay:4 项通过;导出归一化测试见 benchmark README。 -- Control-plane 全部 library 单元测试:633 项通过。 -- 新增 control-plane 集成测试:3 项通过,覆盖改变绑定、保守回退和二元运算 fallback。 -- Provider、replay、control-plane 接入与 benchmark 测量口径经过其他 agent 交叉检查。 - -复现入口: - -- [真实 benchmark 命令与测量方法](../tools/empirical-bench/README.md) -- [Planner replay 命令](user-guide/o11y-replay.md) -- Control plane:其 worktree 的 `tools/run-offline-planner-replay.py` 和 - `control_plane/docs/offline-sketch-evidence.md`。 -- 输出目录:`tools/empirical-bench/results/`,包含 uniform/Zipf 的 evidence、context、 - planner replay 和 control-plane replay;控制面报告记录了实际命令和两仓库版本。 - -这些结果是离线可复现实验与规划覆盖报告,不是线上端到端性能结论。 +| Planner query candidate coverage | 26/27 have exact-summary candidates; 1/27 falls back to raw; 0/27 have approximate-sketch candidates | +| Planner complete lifecycle selection | 27/27 conservatively fall back to raw because complete physical-cost evidence is missing | +| Control-plane parser + typed binder | Each of exact/default/empirical binds 24/27 and rejects 3/27 | +| Separate supplemental queries | Two quantile queries and one count_over_time query; both default and empirical modes can produce sketch candidates | +| Measurement applicability | CMS/CountSketch configurations for count_over_time match update-cost measurements; quantile measurements are missing | + +The three forms rejected by the control plane are a bare metric selector, +`sort_desc(...)`, and `... > 0`. These are not parser failures: the typed binder +at this stage has no corresponding bindable root candidate. Successful binding +also does not establish deployable execution; some bound results still fall back +to raw queries. Concat metadata handling and Summary BinaryOp compatibility were +added to connect the newer Planner. Binary operations unsupported by the warm tier +retain an explicit fallback. + +Measured evidence did not change o11y selection because these queries have no +corresponding sketch candidates. CMS update CPU is substantially lower for the +supplemental query, so empirical ranking preserves CMS first. Offline point-frequency +error is not treated as count_over_time or o11y result error. + +Complete-query CPU and memory benefits are null. Quantifying o11y benefits in the +next stage requires measurements of exact-summary and raw/residual operators on +the corresponding metric data, group cardinalities, windows, and execution +frequencies, followed by complete physical-cost comparison. Adding only more +sketch-algorithm measurements cannot supply those missing inputs. + +## Validation and Reproduction + +- Planner mapping unit tests: 342 passed. +- Planner replay: four passed; see the benchmark README for export normalization tests. +- All control-plane library unit tests: 633 passed. +- New control-plane integration tests: three passed, covering changed binding, conservative fallback, and binary-operation fallback. +- Other agents cross-checked the provider, replay, control-plane integration, and benchmark measurement semantics. + +Reproduction entry points: + +- [Real benchmark commands and measurement methods](../tools/empirical-bench/README.md) +- [Planner replay commands](user-guide/o11y-replay.md) +- Control plane: `tools/run-offline-planner-replay.py` and + `control_plane/docs/offline-sketch-evidence.md` in its worktree. +- Output directory: `tools/empirical-bench/results/`, containing Uniform/Zipf + evidence, contexts, planner replay, and control-plane replay. Control-plane + reports record the actual commands and both repository revisions. + +These results are reproducible offline experiments and a planning-coverage report, +not conclusions about online end-to-end performance. diff --git a/docs/offline-o11y-final-2026-09-08.md b/docs/offline-o11y-final-2026-09-08.md index c94eead4..501431c1 100644 --- a/docs/offline-o11y-final-2026-09-08.md +++ b/docs/offline-o11y-final-2026-09-08.md @@ -1,74 +1,89 @@ -# 离线 sketch 证据与 o11y:最终报告 +# Offline Sketch Evidence and o11y: Final Report -面向开发者。对应 #322 的离线证据路径,不包含实时误差反馈。原有脏工作区未修改。 +Audience: developers. This report covers the offline evidence path for #322, +without real-time error feedback. The original dirty working directory was left unchanged. -## 完成的路径 +## Completed Integration -- 版本化 artifact、JSON Schema 和公共 CostModel provider,按参数、查询语义、分布、环境和有效期匹配。未知测量保持 unavailable。 -- CMS/CountSketch 真实参数扫描:离线误差、分离的构造/更新/读取/合并 CPU、存活堆内存、序列化大小和文件块占用。 -- 固定快照 point-frequency 比较:显式观测误差门槛、formal 参数下限、CPU/retained byte-seconds 权重及同数据 exact baseline。 -- Backend 先过滤不支持的布局,再推荐和绑定 frequency 配置;exact 胜出或证据不足时保留原查询,不擅自把选中参数取整。 -- o11y planner/control-plane replay,以及七条显式支持查询的 exact 固定快照参考测量。 +- Versioned artifacts, JSON Schema, and a public CostModel provider match parameters, query semantics, distributions, environments, and validity intervals. Unknown measurements remain unavailable. +- Actual CMS/CountSketch parameter sweeps measure offline error, separate construction/update/read/merge CPU, live heap allocations, serialized size, and allocated file blocks. +- Fixed-snapshot point-frequency comparisons use explicit observed-error thresholds, formal parameter minima, CPU/retained byte-seconds weights, and an exact baseline on the same data. +- The backend filters unsupported layouts before recommending and binding frequency configurations. When exact execution wins or evidence is insufficient, it preserves the original query without silently rounding selected parameters. +- o11y planner/control-plane replay and exact fixed-snapshot reference measurements cover seven explicitly supported queries. -接口与复现见 [证据契约](developer_docs/offline-sketch-evidence.md)、 -[benchmark 命令](../tools/empirical-bench/README.md) 和 [replay 指南](user-guide/o11y-replay.md)。 +For interfaces and reproduction instructions, see the [evidence contract](developer_docs/offline-sketch-evidence.md), +[benchmark commands](../tools/empirical-bench/README.md), and [replay guide](user-guide/o11y-replay.md). -## 实测结果 +## Measured Results -sketch-bench 固定 revision `87f619e843fd2e4da784160d4e205a0d0d55f032`。 -Uniform/Zipf 各 20,000 个 i64 key,key-space 1,000、seed 42、Zipf 指数 1.1。 -共 18 个 sketch 配置、两个 exact baseline;CPU 五次测量、两次预热。 -准确率是每个固定数据集的一次离线实验,不是跨分布保证或实时 ground truth。 -比较场景为一次构建、1,000 次查询、保留 300 秒、不合并。 +sketch-bench is pinned to revision `87f619e843fd2e4da784160d4e205a0d0d55f032`. +The uniform and Zipf datasets each contain 20,000 i64 keys, with a key space of +1,000, seed 42, and Zipf exponent 1.1. There are 18 sketch configurations and +two exact baselines; CPU measurements use five trials after two warmups. +Accuracy comes from one offline experiment per fixed dataset, not a guarantee +across distributions or real-time ground truth. The comparison assumes one +build, 1,000 queries, 300 seconds of retention, and no merges. -| 场景 | Uniform / Zipf 结果 | +| Scenario | Uniform / Zipf results | | --- | --- | -| CPU-only,1% 或 5% 观测平均相对误差上限 | 都选择 exact;没有 sketch CPU 收益 | -| 通用比较器,memory-weighted | CMS 2720×5;retained heap 减少 81.68%,CPU 分别增加约 0.037 / 0.182 ms | -| Backend 可绑定的 memory-weighted 配置 | CMS 4096×5;retained heap 减少约 72.4%,CPU 同样增加 | +| CPU-only, with a 1% or 5% observed mean relative-error limit | Both select exact execution; no sketch CPU benefit | +| Generic comparator, with memory weighting | CMS 2720×5; retained heap decreases by 81.68%, while CPU increases by approximately 0.037 / 0.182 ms, respectively | +| Backend-compatible configuration, with memory weighting | CMS 4096×5; retained heap decreases by approximately 72.4%, while CPU also increases | -memory-weighted 目标为 `CPU ns + 0.01 × retained byte-seconds`;权重是示例偏好, -不是硬件测得的换算关系。Exact retained heap 为 296,976 B;CMS 2720×5 为 -54,400 B,4096×5 为 81,920 B。内存由独立 System 分配器探针测得申请字节, -CPU 使用 jemalloc;不等同于进程 RSS。序列化和文件块占用不代表磁盘吞吐收益。 +The memory-weighted objective is `CPU ns + 0.01 × retained byte-seconds`. These +weights express an illustrative preference, not a conversion measured from +hardware. Exact retained heap is 296,976 B; CMS 2720×5 uses 54,400 B, and +4096×5 uses 81,920 B. Memory figures measure requested allocation bytes using +a separate System allocator probe; CPU measurements use jemalloc. These memory +figures are not process RSS. Serialized size and allocated file blocks do not +establish disk-throughput benefits. -详见 [最终扫描报告](../tools/empirical-bench/results-sweep/MEASUREMENTS.md)。 -`results/` 中旧频率测量及旧 control-plane replay 保留为初始基线;最终频率比较和 -控制面结果以 `results-sweep/` 为准,不混用两轮成本。 +See the [final sweep report](../tools/empirical-bench/results-sweep/MEASUREMENTS.md). +Earlier frequency measurements and control-plane replay in `results/` remain +as the initial baseline. Final frequency comparisons and control-plane results +use `results-sweep/`; costs from the two runs must not be mixed. -## o11y 覆盖及限制 +## o11y Coverage and Limitations -复用仓库已有 27 条 PromQL fixture,不运行上游 LLM-agent 评分或真实场景数据。 +The replay reuses the repository's existing 27 PromQL fixtures. It does not run +upstream LLM-agent scoring or use real scenario data. -| 检查 | 结果 | +| Check | Result | | --- | --- | -| Planner 候选覆盖 | 26/27 有 exact summary 候选,1/27 raw fallback;没有 sketch 候选 | -| 原始 replay 完整生命周期成本 | 证据不足,27/27 保守 raw fallback | -| Control-plane exact/default/empirical 绑定 | 均 27/27 成功;其中各 5 条根计划仍保留原查询 | -| 七条 exact 参考查询 | 固定合成 gauge 快照上测 raw 与缓存结果读取,经过公共 CostModel 和真实选择流程 | -| 其余 20 条查询 | 缺少完整参考实现,收益 unavailable | - -新增 selector、sort、comparison/filter 根的原始 IR 保留回退,使绑定由 24/27 提升 -为 27/27。绑定不等于全部可由 summary executor 执行。新 IR 的列更新已兼容; -keyed/non-column 更新和 warm-tier BinaryOp 仍明确拒绝。 - -七条参考查询覆盖瞬时 sum、窗口 max 和 sum-of-window-average:300 series、三个 job、 -每分钟一个有限 gauge 样本,重复读取同一快照 60 次。保留的是完整 exact 查询结果, -不是推进时间的滑动窗口。测量排除网络、磁盘、协议序列化和输出标签物化;内存是 -逻辑值字节。不能把重复读取的收益外推为线上端到端加速。 -机器可读结果见 [exact 快照实验](../tools/empirical-bench/results/o11y-exact-snapshot.json)。 - -Quantile 测量、真实 o11y trace、时间漂移、合并后误差、在线更新与退休成本及完整线上 -收益仍未覆盖。Point-frequency 误差不能借给 quantile 或 count_over_time。 - -## 验证与交付 - -- Planner mapping:349 项单元测试通过。 -- Devtools:exact benchmark 3 项、replay 4 项通过;推荐 CLI 用六个实际请求验证。 -- Benchmark 导出:5 项 Python 测试通过。 -- Backend:control-plane 633 项、data-plane 973 项 library 测试通过;新增 7 项集成测试通过。 -- Provider、测量与绑定代码经过 agent 交叉审查;产物文本、JSON、源码哈希和 provenance 核对通过。 - -Backend 固定依赖已发布 planner 核心提交 `dfdf6b5c1f7d667394a4ea1f56fb3786af04228d`, -普通构建和最终 replay 无需本地 Cargo source patches。源码、工具和结果随两个仓库的 -配套 PR 交付,不自动合并或关闭 issue。 +| Planner candidate coverage | 26/27 have exact summary candidates; 1/27 uses raw fallback; no sketch candidates | +| Complete lifecycle costs in the original replay | Insufficient evidence; all 27/27 conservatively fall back to raw execution | +| Control-plane exact/default/empirical binding | All three modes bind 27/27 successfully; each retains the original query in 5 root plans | +| Seven exact reference queries | Raw execution and cached-result reads are measured on fixed synthetic gauge snapshots, using the public CostModel and actual selection flow | +| Remaining 20 queries | No complete reference implementation; benefits remain unavailable | + +New fallbacks preserve the original IR for selector, sort, and comparison/filter +roots, increasing successful binding from 24/27 to 27/27. Binding does not mean +every plan is executable by the summary executor. Column updates in the new IR +are supported; keyed/non-column updates and warm-tier BinaryOp remain explicitly rejected. + +The seven reference queries cover instant sums, window maxima, and sums of +window averages: 300 series, three jobs, one finite gauge sample per minute, +and 60 repeated reads of the same snapshot. The retained state is the complete +exact query result, not a sliding window with advancing time. Measurements +exclude network, disk, protocol serialization, and output-label materialization; +memory figures count logical value bytes. Benefits from repeated reads cannot +be extrapolated to production end-to-end speedups. Machine-readable results are +available in the [exact snapshot experiment](../tools/empirical-bench/results/o11y-exact-snapshot.json). + +Quantile measurements, real o11y traces, time drift, post-merge error, online +update and retirement costs, and complete production benefits remain outside +this coverage. Point-frequency error cannot be applied to quantiles or count_over_time. + +## Validation and Delivery + +- Planner mapping: 349 unit tests pass. +- Devtools: 3 exact benchmark tests and 4 replay tests pass; the recommendation CLI is verified with six actual requests. +- Benchmark export: 5 Python tests pass. +- Backend: 633 control-plane and 973 data-plane library tests pass; 7 new integration tests pass. +- Agents cross-reviewed the provider, measurement, and binding code; artifact text, JSON, source hashes, and provenance were checked successfully. + +The backend pins the published planner core commit +`dfdf6b5c1f7d667394a4ea1f56fb3786af04228d`. Normal builds and final replay do not +require local Cargo source patches. Source code, tools, and results are delivered +through coordinated PRs in the two repositories, without automatically merging +them or closing the issue. From 670a6ff241f16cb5e2aab5c18258e426bcb87a32 Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:29:13 -0600 Subject: [PATCH 6/9] refactor: split benchmark tooling and archived results out of core PR --- Cargo.lock | 2 - crates/devtools/Cargo.toml | 2 - crates/devtools/src/bin/o11y_exact_bench.rs | 367 - crates/devtools/src/bin/o11y_replay.rs | 495 - crates/devtools/src/bin/offline_recommend.rs | 28 - .../empirical-o11y-execution-plan.md | 60 - docs/offline-o11y-evaluation-2026-09-08.md | 135 - docs/offline-o11y-final-2026-09-08.md | 89 - docs/user-guide/o11y-replay.md | 103 - tools/empirical-bench/README.md | 110 - tools/empirical-bench/memory_probe.rs | 101 - tools/empirical-bench/resource_probe.rs | 138 - .../results-sweep/MEASUREMENTS.md | 79 - .../results-sweep/comparison-evidence.json | 2494 - .../results-sweep/context-uniform.json | 23 - .../results-sweep/context-zipf.json | 23 - ...ontrol-plane-frequency-uniform-are001.json | 223 - ...ane-frequency-uniform-memory-weighted.json | 241 - .../control-plane-frequency-zipf-are001.json | 223 - ...-plane-frequency-zipf-memory-weighted.json | 241 - .../results-sweep/control-plane-uniform.json | 1536 - .../results-sweep/control-plane-zipf.json | 1536 - .../results-sweep/exact-baselines.json | 151 - .../results-sweep/manifest.json | 1598 - .../results-sweep/memory-probe.json | 1156 - .../results-sweep/operation-reports.json | 7444 -- .../results-sweep/planner-evidence.json | 2194 - tools/empirical-bench/results-sweep/raw.json | 4608 - .../recommendation-uniform-are001.json | 428 - .../recommendation-uniform-are005.json | 428 - ...ecommendation-uniform-memory-weighted.json | 430 - .../recommendation-zipf-are001.json | 428 - .../recommendation-zipf-are005.json | 428 - .../recommendation-zipf-memory-weighted.json | 430 - .../results-sweep/request-uniform-are001.json | 55 - .../results-sweep/request-uniform-are005.json | 55 - .../request-uniform-memory-weighted.json | 65 - .../results-sweep/request-zipf-are001.json | 55 - .../results-sweep/request-zipf-are005.json | 55 - .../request-zipf-memory-weighted.json | 65 - .../results-sweep/resource-probe.json | 1564 - tools/empirical-bench/results/MEASUREMENTS.md | 59 - .../results/context-uniform.json | 23 - .../empirical-bench/results/context-zipf.json | 23 - .../results/control-plane-uniform.json | 1514 - .../results/control-plane-zipf.json | 1514 - .../results/exact-baselines.json | 113 - tools/empirical-bench/results/manifest.json | 490 - .../empirical-bench/results/memory-probe.json | 198 - .../results/o11y-exact-snapshot.json | 1888 - .../results/operation-reports.json | 2215 - .../results/planner-evidence.json | 433 - tools/empirical-bench/results/raw.json | 1367 - .../results/replay-uniform.json | 72556 ---------------- .../empirical-bench/results/replay-zipf.json | 72550 --------------- tools/empirical-bench/run.py | 367 - tools/empirical-bench/test_export.py | 51 - 57 files changed, 185247 deletions(-) delete mode 100644 crates/devtools/src/bin/o11y_exact_bench.rs delete mode 100644 crates/devtools/src/bin/o11y_replay.rs delete mode 100644 crates/devtools/src/bin/offline_recommend.rs delete mode 100644 docs/design_docs/empirical-o11y-execution-plan.md delete mode 100644 docs/offline-o11y-evaluation-2026-09-08.md delete mode 100644 docs/offline-o11y-final-2026-09-08.md delete mode 100644 docs/user-guide/o11y-replay.md delete mode 100644 tools/empirical-bench/README.md delete mode 100644 tools/empirical-bench/memory_probe.rs delete mode 100644 tools/empirical-bench/resource_probe.rs delete mode 100644 tools/empirical-bench/results-sweep/MEASUREMENTS.md delete mode 100644 tools/empirical-bench/results-sweep/comparison-evidence.json delete mode 100644 tools/empirical-bench/results-sweep/context-uniform.json delete mode 100644 tools/empirical-bench/results-sweep/context-zipf.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-uniform.json delete mode 100644 tools/empirical-bench/results-sweep/control-plane-zipf.json delete mode 100644 tools/empirical-bench/results-sweep/exact-baselines.json delete mode 100644 tools/empirical-bench/results-sweep/manifest.json delete mode 100644 tools/empirical-bench/results-sweep/memory-probe.json delete mode 100644 tools/empirical-bench/results-sweep/operation-reports.json delete mode 100644 tools/empirical-bench/results-sweep/planner-evidence.json delete mode 100644 tools/empirical-bench/results-sweep/raw.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-are001.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-are005.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-are001.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-are005.json delete mode 100644 tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/request-uniform-are001.json delete mode 100644 tools/empirical-bench/results-sweep/request-uniform-are005.json delete mode 100644 tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/request-zipf-are001.json delete mode 100644 tools/empirical-bench/results-sweep/request-zipf-are005.json delete mode 100644 tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json delete mode 100644 tools/empirical-bench/results-sweep/resource-probe.json delete mode 100644 tools/empirical-bench/results/MEASUREMENTS.md delete mode 100644 tools/empirical-bench/results/context-uniform.json delete mode 100644 tools/empirical-bench/results/context-zipf.json delete mode 100644 tools/empirical-bench/results/control-plane-uniform.json delete mode 100644 tools/empirical-bench/results/control-plane-zipf.json delete mode 100644 tools/empirical-bench/results/exact-baselines.json delete mode 100644 tools/empirical-bench/results/manifest.json delete mode 100644 tools/empirical-bench/results/memory-probe.json delete mode 100644 tools/empirical-bench/results/o11y-exact-snapshot.json delete mode 100644 tools/empirical-bench/results/operation-reports.json delete mode 100644 tools/empirical-bench/results/planner-evidence.json delete mode 100644 tools/empirical-bench/results/raw.json delete mode 100644 tools/empirical-bench/results/replay-uniform.json delete mode 100644 tools/empirical-bench/results/replay-zipf.json delete mode 100644 tools/empirical-bench/run.py delete mode 100644 tools/empirical-bench/test_export.py diff --git a/Cargo.lock b/Cargo.lock index 2fe45ad6..34f106da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,8 +320,6 @@ dependencies = [ "asap-frontend-promql", "asap-frontend-sql", "asap-types", - "libc", - "regex", "serde", "serde_json", "serde_yaml", diff --git a/crates/devtools/Cargo.toml b/crates/devtools/Cargo.toml index 748fae18..0abc8ccd 100644 --- a/crates/devtools/Cargo.toml +++ b/crates/devtools/Cargo.toml @@ -19,6 +19,4 @@ asap-types = { path = "../types" } serde = { version = "1", features = ["derive"] } serde_json = "1" serde_yaml = "0.9" -libc = "0.2" -regex = "1" tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread"] } diff --git a/crates/devtools/src/bin/o11y_exact_bench.rs b/crates/devtools/src/bin/o11y_exact_bench.rs deleted file mode 100644 index e0cd9bbd..00000000 --- a/crates/devtools/src/bin/o11y_exact_bench.rs +++ /dev/null @@ -1,367 +0,0 @@ -//! Fixed-snapshot exact summary profiling for a deliberately bounded o11y subset. -use std::{hint::black_box, rc::Rc}; - -use asap_aware_mapping::cost_model::Cost; -use asap_aware_mapping::{ - default_strategies_with, search_workload_with_targets, CostModel, DefaultAccuracyModel, - DefaultCostModel, Replacement, ReplacementStrategy, ReplacementSubDAG, SketchAlgorithmStrategy, - TargetSubDAG, -}; -use asap_devtools::lower_promql; -use asap_types::{ - post_asap::SketchAlgorithm, - pre_asap::{AggIntent, QueryExpr}, - types::AccuracyTarget, -}; -use serde_json::{json, Value}; - -const CORPUS: &str = - include_str!("../../../frontend-promql/tests/observability/data/o11y_bench_promql.txt"); - -#[derive(Clone, Copy, Debug)] -enum Kernel { - SumInstant, - MaxWindow, - SumAverageWindow, -} - -struct Fixture { - query: &'static str, - kernel: Kernel, - range_seconds: u64, - job_matcher: Option, -} - -// Admit pinned fixture queries whose full value computation is implemented. -// Regex construction belongs to planning, not execution, on both paths. -fn fixture(query: &'static str) -> Option { - let (kernel, range_seconds, matcher) = match query { - "sum(process_resident_memory_bytes)" | "sum(up)" => (Kernel::SumInstant, 0, None), - "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])" => { - (Kernel::MaxWindow, 43200, Some("^user-service$")) - } - "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])" => { - (Kernel::MaxWindow, 21600, Some("^order-service$")) - } - "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])" => { - (Kernel::MaxWindow, 21600, Some("^payment-service$")) - } - "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])" => { - (Kernel::MaxWindow, 21600, Some("^.+$")) - } - "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))" => { - (Kernel::SumAverageWindow, 21600, Some("^.+$")) - } - _ => return None, - }; - Some(Fixture { - query, - kernel, - range_seconds, - job_matcher: matcher.map(|m| regex::Regex::new(m).unwrap()), - }) -} - -struct Series { - job: &'static str, - samples: Vec, -} - -fn data(fixture: &Fixture, series: usize) -> Vec { - let samples = if fixture.range_seconds == 0 { - 1 - } else { - fixture.range_seconds as usize / 60 - }; - (0..series) - .map(|s| Series { - job: ["user-service", "order-service", "payment-service"][s % 3], - samples: (0..samples) - .map(|t| { - if fixture.query == "sum(up)" { - if s % 11 == 0 { - 0.0 - } else { - 1.0 - } - } else { - ((s * 73 + t * 31 + (s * t) % 17) % 10000) as f64 / 100.0 - } - }) - .collect(), - }) - .collect() -} - -fn raw(fixture: &Fixture, data: &[Series]) -> Vec { - let selected = data.iter().filter(|s| { - fixture - .job_matcher - .as_ref() - .is_none_or(|r| r.is_match(s.job)) - }); - match fixture.kernel { - Kernel::SumInstant => vec![selected.map(|s| s.samples[0]).sum()], - Kernel::MaxWindow => selected - .map(|s| s.samples.iter().copied().fold(f64::NEG_INFINITY, f64::max)) - .collect(), - Kernel::SumAverageWindow => vec![selected - .map(|s| s.samples.iter().sum::() / s.samples.len() as f64) - .sum()], - } -} - -#[cfg(unix)] -fn cpu_ns() -> u64 { - let mut ts = libc::timespec { - tv_sec: 0, - tv_nsec: 0, - }; - // A process CPU clock excludes scheduling waits; no wall-time conversion. - assert_eq!( - unsafe { libc::clock_gettime(libc::CLOCK_PROCESS_CPUTIME_ID, &mut ts) }, - 0 - ); - ts.tv_sec as u64 * 1_000_000_000 + ts.tv_nsec as u64 -} - -fn measure(mut op: impl FnMut(), iterations: usize) -> Value { - for _ in 0..2 { - op(); - } - let samples: Vec<_> = (0..5) - .map(|_| { - let start = cpu_ns(); - for _ in 0..iterations { - op(); - } - (cpu_ns() - start) as f64 / iterations as f64 - }) - .collect(); - let mean = samples.iter().sum::() / samples.len() as f64; - let stddev = (samples.iter().map(|x| (x - mean).powi(2)).sum::() - / (samples.len() - 1) as f64) - .sqrt(); - json!({"mean_cpu_ns":mean, "stddev_cpu_ns":stddev, "samples_cpu_ns":samples, "iterations_per_sample":iterations}) -} - -// This reference deployment admits exactly the root it profiled. CPU values -// apply to the complete bounded in-memory kernel, never an interior group. -struct ProfiledModel<'a> { - root: &'a QueryExpr, - approved: Vec>, - raw_cpu: f64, - candidate_cpu: f64, -} - -fn approved_profiles(root: &Rc) -> Vec> { - SketchAlgorithmStrategy::new(&DefaultCostModel) - .replacements(&TargetSubDAG::new(root)) - .into_iter() - .filter_map(|candidate| match candidate.replacement { - Replacement::Summary(node) - if matches!( - node.expr, - asap_types::post_asap::SummaryExpr::SummaryAgg { .. } - ) && node.guarantee.as_ref().is_some_and(|g| g.is_exact()) => - { - Some(node) - } - _ => None, - }) - .collect() -} - -impl CostModel for ProfiledModel<'_> { - fn rank_candidates( - &self, - intent: &AggIntent, - candidates: &[SketchAlgorithm], - ) -> Vec { - DefaultCostModel.rank_candidates(intent, candidates) - } - fn candidate_cost_covers_complete_plan(&self) -> bool { - true - } - fn candidate_cost( - &self, - candidate: &ReplacementSubDAG, - target: &TargetSubDAG<'_>, - ) -> Option { - let Replacement::Summary(node) = &candidate.replacement else { - return None; - }; - if target.root.as_ref() != self.root || !self.approved.contains(node) { - return None; - } - (self.candidate_cpu < self.raw_cpu).then_some(Cost(self.candidate_cpu)) - } - fn estimate_cost(&self, candidate: &ReplacementSubDAG, target: &TargetSubDAG<'_>) -> f64 { - self.candidate_cost(candidate, target) - .map_or(f64::INFINITY, |c| c.0) - } -} - -fn run(fixture: &Fixture, series: usize, evaluations: usize) -> Value { - let root = Rc::new(lower_promql(fixture.query, AccuracyTarget::Exact).unwrap()); - let data = data(fixture, series); - let cached = raw(fixture, &data); - // Same ordered per-series output, or the same scalar; immutable fixed - // windows, no staleness, NaNs, counter resets, or advancing evaluation time. - assert_eq!(raw(fixture, &data), cached.clone()); - let raw_measurement = measure( - || { - black_box(raw(black_box(fixture), black_box(&data))); - }, - 25, - ); - let read_measurement = measure( - || { - black_box(black_box(&cached).clone()); - }, - 10000, - ); - let raw_per_eval = raw_measurement["mean_cpu_ns"].as_f64().unwrap(); - let read_per_eval = read_measurement["mean_cpu_ns"].as_f64().unwrap(); - // Building a fixed-window summary executes the identical raw kernel once. - // Both timers include output allocation and destruction; one-time build - // therefore conservatively includes a destruction absent during retention. - let raw_total = raw_per_eval * evaluations as f64; - let summary_total = raw_per_eval + read_per_eval * evaluations as f64; - let model = ProfiledModel { - root: &root, - approved: approved_profiles(&root), - raw_cpu: raw_total, - candidate_cpu: summary_total, - }; - let candidates = SketchAlgorithmStrategy::new(&model).replacements(&TargetSubDAG::new(&root)); - let accepted = candidates - .iter() - .filter(|c| model.candidate_cost(c, &TargetSubDAG::new(&root)).is_some()) - .count(); - let space = search_workload_with_targets( - vec![(0, root.clone(), Some(AccuracyTarget::Exact))], - &default_strategies_with(&model), - &DefaultAccuracyModel, - ); - let selection = space.global_selection(&model); - let selected_root = &space.roots[0].1; - let selected_plan = selection.materialize(selected_root).unwrap(); - let selected_summary = selected_plan - .as_ref() - .is_some_and(|node| model.approved.contains(node)); - let retained_value_bytes = cached.len() * std::mem::size_of::(); - json!({"query":fixture.query,"status":"profiled_fixed_snapshot", "kernel":format!("{:?}",fixture.kernel), - "profile_model_version":"fixed-snapshot-exact-values-v1", "planner_candidate_count":candidates.len(), - "accepted_measured_candidates":accepted, - "selected":if selected_summary {"retained_exact_summary"} else {"raw_recompute"}, - "selected_planner_graph":selected_plan.as_ref().map(|node|asap_types::dag_export::export_summary(node)), - "input_series":series,"selected_series":data.iter().filter(|s|fixture.job_matcher.as_ref().is_none_or(|r|r.is_match(s.job))).count(), - "samples_per_series":data[0].samples.len(),"sample_interval_seconds":60,"range_seconds":fixture.range_seconds, - "input_value_bytes":data.iter().map(|s|s.samples.len()*8).sum::(), - "retained_value_bytes":retained_value_bytes,"retained_value_bytes_method":"exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "raw_per_evaluation":raw_measurement,"summary_read_per_evaluation":read_measurement, - "evaluations":evaluations,"raw_cpu_ns":raw_total,"summary_cpu_ns":summary_total, - "estimated_cpu_reduction_fraction":if selected_summary {Some(1.0-summary_total/raw_total)} else {None}, - "output_equality_verified":true, - "comparison_scope":"same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "exclusions":["disk/network storage and protocol serialization", "label output materialization shared by both paths", "live updates, eviction, sliding windows, staleness and exceptional samples"]}) -} - -fn main() -> Result<(), Box> { - let args: Vec<_> = std::env::args().skip(1).collect(); - let series: usize = args.first().map_or(Ok(300), |x| x.parse())?; - let evaluations: usize = args.get(1).map_or(Ok(60), |x| x.parse())?; - if args.len() > 2 || series == 0 || series > 10000 || evaluations == 0 { - return Err("usage: o11y_exact_bench [SERIES(1..10000)] [EVALUATIONS>0]".into()); - } - let rows: Vec<_> = CORPUS.lines().map(str::trim).filter(|q|!q.is_empty()&&!q.starts_with('#')).map(|q| - fixture(q).map_or_else(||json!({"query":q,"status":"unavailable","reason":"no complete reference kernel for this query; no borrowed costs"}), |f|run(&f,series,evaluations))).collect(); - let cpu = std::fs::read_to_string("/proc/cpuinfo") - .ok() - .and_then(|text| { - text.lines() - .find(|line| line.starts_with("model name")) - .map(str::to_owned) - }); - let revision = std::process::Command::new("git") - .args(["rev-parse", "HEAD"]) - .output() - .ok() - .filter(|out| out.status.success()) - .map(|out| String::from_utf8_lossy(&out.stdout).trim().to_owned()); - serde_json::to_writer_pretty( - std::io::stdout(), - &json!({"schema_version":1, - "data":"synthetic deterministic finite gauges; three jobs; non-stale finite float samples on (T-window,T] every60s", - "implementation":"o11y_exact_bench Rust reference kernels; not production data-plane runtime", - "build_profile":if cfg!(debug_assertions){"debug"}else{"release"}, - "source_revision":revision,"source_file":"crates/devtools/src/bin/o11y_exact_bench.rs", - "command_arguments":args,"cpu":cpu,"os":std::env::consts::OS,"arch":std::env::consts::ARCH, - "timing_environment":"shared development host; no exclusive core reservation or CPU affinity", - "clock":"CLOCK_PROCESS_CPUTIME_ID","rows":rows}), - )?; - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - #[test] - fn admission_is_explicit_and_unknown_semantics_stay_unavailable() { - assert_eq!(CORPUS.lines().filter(|q| fixture(q).is_some()).count(), 7); - assert!(fixture("sum(rate(http_requests_total[5m]))").is_none()); - } - #[test] - fn kernels_match_independent_small_reference_results() { - let input = vec![ - Series { - job: "order-service", - samples: vec![2.0, 4.0], - }, - Series { - job: "payment-service", - samples: vec![8.0, 10.0], - }, - ]; - let max = - fixture("max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])").unwrap(); - assert_eq!(raw(&max, &input), vec![4.0]); - let avg = - fixture("sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))").unwrap(); - assert_eq!(raw(&avg, &input), vec![12.0]); - } - #[test] - fn measured_scope_and_break_even_control_candidate_acceptance() { - let root = Rc::new(lower_promql("sum(up)", AccuracyTarget::Exact).unwrap()); - let target = TargetSubDAG::new(&root); - let candidates = SketchAlgorithmStrategy::new(&DefaultCostModel).replacements(&target); - assert!(!candidates.is_empty()); - let slow = ProfiledModel { - root: &root, - approved: approved_profiles(&root), - raw_cpu: 100.0, - candidate_cpu: 101.0, - }; - let fast = ProfiledModel { - root: &root, - approved: approved_profiles(&root), - raw_cpu: 100.0, - candidate_cpu: 90.0, - }; - assert!(slow.candidate_cost(&candidates[0], &target).is_none()); - assert_eq!( - fast.candidate_cost(&candidates[0], &target), - Some(Cost(90.0)) - ); - let other = Rc::new(lower_promql("sum(other)", AccuracyTarget::Exact).unwrap()); - assert!(fast - .candidate_cost(&candidates[0], &TargetSubDAG::new(&other)) - .is_none()); - let mut unprofiled = candidates[0].clone(); - let mut node = fast.approved[0].as_ref().clone(); - node.expr = asap_types::post_asap::SummaryExpr::KeepPreAsap(root.clone()); - unprofiled.replacement = Replacement::Summary(Rc::new(node)); - assert!(fast.candidate_cost(&unprofiled, &target).is_none()); - } -} diff --git a/crates/devtools/src/bin/o11y_replay.rs b/crates/devtools/src/bin/o11y_replay.rs deleted file mode 100644 index 579f586d..00000000 --- a/crates/devtools/src/bin/o11y_replay.rs +++ /dev/null @@ -1,495 +0,0 @@ -//! Offline workload replay through search, selection, and lifecycle planning. -use std::{collections::HashSet, error::Error, rc::Rc, time::Instant}; - -use asap_aware_mapping::empirical_cost::{ - EmpiricalCostModel, EmpiricalEvidenceProvider, EvidenceArtifact, EvidenceContext, -}; -use asap_aware_mapping::{ - default_strategies_with, export_summary_maintenance_plan, - materialize_with_summary_maintenance_lifecycles, search_workload_with_targets, CostModel, - DefaultAccuracyModel, DefaultCostModel, Horizon, Replacement, - SummaryMaintenanceLifecycleCapabilities, WorkloadDemand, -}; -use asap_devtools::lower_promql; -use asap_types::{ - dag_export, - post_asap::{SummaryExpr, SummaryFamilyType, SummaryNode}, - pre_asap::QueryExpr, - types::AccuracyTarget, - workload::*, -}; -use serde_json::{json, Value}; - -const CORPUS: &str = - include_str!("../../../frontend-promql/tests/observability/data/o11y_bench_promql.txt"); -const SUPPLEMENTAL: &str = "quantile_over_time(0.95, service_latency_seconds[5m])\nquantile_over_time(0.99, service_latency_seconds[5m])\ncount_over_time(offline_frequency_metric[5m])"; - -struct Options { - epsilon: f64, - evaluations: u64, - now_ms: u64, - supplemental: bool, - queries: Option, - evidence_path: Option, - context_path: Option, -} - -impl Default for Options { - fn default() -> Self { - Self { - epsilon: 0.01, - evaluations: 60, - now_ms: 1_788_825_600_000, - supplemental: false, - queries: None, - evidence_path: None, - context_path: None, - } - } -} - -fn parse_options(args: impl IntoIterator) -> Result> { - let mut options = Options::default(); - let mut args = args.into_iter(); - while let Some(arg) = args.next() { - match arg.as_str() { - "--supplemental" => options.supplemental = true, - "--epsilon" => options.epsilon = args.next().ok_or("missing epsilon")?.parse()?, - "--evaluations" => options.evaluations = args.next().ok_or("missing evaluations")?.parse()?, - "--now-ms" => options.now_ms = args.next().ok_or("missing now-ms")?.parse()?, - "--queries" => options.queries = Some(std::fs::read_to_string(args.next().ok_or("missing queries path")?)?), - "--evidence" => options.evidence_path = Some(args.next().ok_or("missing evidence path")?), - "--context" => options.context_path = Some(args.next().ok_or("missing context path")?), - _ => return Err(format!("unknown option {arg}; use --epsilon, --evaluations, --now-ms, --queries, --supplemental, --evidence and --context").into()), - } - } - if !options.epsilon.is_finite() - || !(0.0..1.0).contains(&options.epsilon) - || options.epsilon == 0.0 - { - return Err("epsilon must be finite and strictly between 0 and 1".into()); - } - if options.evaluations == 0 { - return Err("evaluations must be positive".into()); - } - if options.evidence_path.is_some() != options.context_path.is_some() { - return Err("--evidence and --context must be supplied together".into()); - } - Ok(options) -} - -fn queries(text: &str) -> Vec { - text.lines() - .map(str::trim) - .filter(|q| !q.is_empty() && !q.starts_with('#')) - .map(str::to_owned) - .collect() -} - -// Attribute memo groups by DAG identity after workload-wide CSE. Scalar -// expressions aren't replacement sites; they remain part of their operator. -fn reachable(node: &QueryExpr, found: &mut HashSet<*const QueryExpr>) { - if !found.insert(node as *const QueryExpr) { - return; - } - use QueryExpr::*; - match node { - PromqlVectorFromScalar(child) - | PromqlScalarFromVector(child) - | PromqlRelabel { child, .. } - | PromqlInfoEnrich { child, .. } - | PromqlSeriesSample { child, .. } - | Filter { child, .. } - | Project { child, .. } - | Aggregate { child, .. } - | Dedup { child, .. } - | PromqlSubquery { child, .. } - | TimeRange { child, .. } - | TimeShift { child, .. } - | SQLWindowFunc { child, .. } - | Sort { child, .. } - | Limit { child, .. } => reachable(child, found), - Concat { children, .. } => { - for child in children { - reachable(child, found); - } - } - Join { left, right, .. } | SetOp { left, right, .. } => { - reachable(left, found); - reachable(right, found); - } - BinaryOp { lhs, rhs, .. } => { - reachable(lhs, found); - reachable(rhs, found); - } - _ => {} - } -} - -fn family_report( - family: &SummaryFamilyType, - provider: Option<&EmpiricalEvidenceProvider>, -) -> Value { - let evidence = if let SummaryFamilyType::Sketch(kind, _) = family { - match provider { - Some(provider) => match provider.lookup(kind.algorithm(), kind.params()) { - Ok(row) => json!({"status": "matched_configuration", "measurement": row, - "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query"}), - Err(error) => json!({"status": "unavailable", "reason": error.to_string()}), - }, - None => { - json!({"status": "unavailable", "reason": "no empirical provider in this mode"}) - } - } - } else { - json!({"status": "unavailable", "reason": "offline sketch evidence does not cost exact operators"}) - }; - let sketch = match family { - SummaryFamilyType::Sketch(kind, _) => { - json!({"algorithm": kind.algorithm(), "params": kind.params()}) - } - _ => Value::Null, - }; - json!({"family": format!("{family:?}"), "sketch": sketch, - "is_sketch": matches!(family, SummaryFamilyType::Sketch(..)), "offline_evidence": evidence}) -} - -fn families( - node: &SummaryNode, - result: &mut Vec, - provider: Option<&EmpiricalEvidenceProvider>, -) { - use SummaryExpr::*; - match &node.expr { - SummaryAgg { family, child, .. } => { - result.push(family_report(family, provider)); - families(child, result, provider); - } - SummaryJoin { - family, - outer, - inner, - .. - } => { - result.push(family_report(family, provider)); - families(outer, result, provider); - families(inner, result, provider); - } - SummaryEstimate { summary_input, .. } | SummaryDelete { summary_input, .. } => { - families(summary_input, result, provider) - } - BinaryOp { lhs, rhs, .. } => { - families(lhs, result, provider); - families(rhs, result, provider); - } - SummarySubtract { left, right } => { - families(left, result, provider); - families(right, result, provider); - } - SummaryMerge { children } => { - for child in children { - families(child, result, provider); - } - } - KeepPreAsap(_) => {} - } -} - -fn replay( - name: &str, - query_texts: &[String], - accuracy: AccuracyTarget, - options: &Options, - model: &dyn CostModel, - provider: Option<&EmpiricalEvidenceProvider>, -) -> Value { - let lowering_start = Instant::now(); - let mut roots = Vec::new(); - let mut rows = Vec::new(); - for (index, query) in query_texts.iter().enumerate() { - match lower_promql(query, accuracy.clone()) { - Ok(root) => roots.push((index, Rc::new(root), Some(accuracy.clone()))), - Err(error) => rows.push(json!({"index": index, "query": query, "coverage": "rejected", "reason": error.to_string()})), - } - } - let lowering_ns = lowering_start.elapsed().as_nanos(); - let search_start = Instant::now(); - let space = search_workload_with_targets( - roots, - &default_strategies_with(model), - &DefaultAccuracyModel, - ); - let search_ns = search_start.elapsed().as_nanos(); - let selection_start = Instant::now(); - let ranked = space.cost_sorted(model); - let selection = space.global_selection(model); - let selection_ns = selection_start.elapsed().as_nanos(); - let workload = QueryWorkload { - language: QueryLanguage::PromQL, - query_batch: Some( - query_texts - .iter() - .map(|q| BatchEntry { - query: Query(q.clone()), - requirements: QueryRequirements { - accuracy: AccuracyRequirement::Explicit(accuracy.clone()), - ..Default::default() - }, - predictability: Predictability::AdHoc, - invocations: options.evaluations, - execute_at: Some(TimestampMs(options.now_ms)), - time_selection: TimeSelection { - as_of: Some(TimestampMs(options.now_ms)), - ..Default::default() - }, - }) - .collect(), - ), - repeating_queries: None, - data_workload: Some(DataWorkload { - arrival: DataArrival::AtRest, - ..Default::default() - }), - }; - for (index, root) in &space.roots { - let started = Instant::now(); - let mut found = HashSet::new(); - reachable(root, &mut found); - let mut candidates = Vec::new(); - let mut rejected = Vec::new(); - for (group_index, group) in ranked - .iter() - .enumerate() - .filter(|(_, g)| found.contains(&Rc::as_ptr(g.target))) - { - let target_intent = asap_aware_mapping::replacement::bindable_intent(group.target) - .map(|intent| format!("{intent:?}")); - for (rank, candidate) in group.candidates.iter().enumerate() { - let mut family_list = Vec::new(); - if let Replacement::Summary(node) = &candidate.replacement { - families(node, &mut family_list, provider); - } - candidates.push( - json!({"group": group_index, "rank": rank, "strategy": candidate.strategy, - "target_intent": target_intent, - "rationale": candidate.rationale, "families": family_list, - "heuristic_score": group.costs[rank].is_finite().then_some(group.costs[rank]), - "score_unit": "dimensionless_not_cpu", "consumer_count": group.consumer_count}), - ); - } - if let Some(memo) = space.group_for(group.target) { - rejected.extend(memo.rejected.iter().map(|r| json!({"group": group_index, "strategy": r.strategy, "description": r.description, "reason": r.error.to_string()}))); - } - } - let has_sketch = candidates.iter().any(|c| { - c["families"] - .as_array() - .unwrap() - .iter() - .any(|f| f["is_sketch"] == true) - }); - let has_summary = candidates - .iter() - .any(|c| !c["families"].as_array().unwrap().is_empty()); - let materialized = selection.materialize(root); - let root_plan = match materialized { - Ok(Some(node)) => { - json!({"graph": dag_export::export_summary(&node), "guarantee": node.guarantee}) - } - Ok(None) => json!({"reason": "no selected root group"}), - Err(error) => json!({"reason": error.to_string()}), - }; - let lifecycle = match materialize_with_summary_maintenance_lifecycles( - &selection, - root, - WorkloadDemand::new(&workload, &[*index]), - options.now_ms, - Some(Horizon(3600.0)), - SummaryMaintenanceLifecycleCapabilities::ALL, - model, - ) { - Ok(Some(plan)) => json!(export_summary_maintenance_plan(&plan)), - Ok(None) => json!({"reason": "no selected root group", "selected_raw_recompute": true}), - Err(error) => json!({"reason": error.to_string(), "selected_raw_recompute": true}), - }; - rows.push(json!({"index": index, "query": query_texts[*index], - "coverage": if has_sketch { "sketch_candidate" } else if has_summary { "exact_summary_candidate" } else { "exact_fallback" }, - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "candidates": candidates, "rejections": rejected, "root_plan": root_plan, "lifecycle_plan": lifecycle, - "report_and_materialization_ns": started.elapsed().as_nanos(), - "estimated_end_to_end_cpu_savings": null, "estimated_end_to_end_memory_savings": null, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable"})); - } - rows.sort_by_key(|row| row["index"].as_u64()); - let mut coverage_counts = std::collections::BTreeMap::new(); - for row in &rows { - *coverage_counts - .entry(row["coverage"].as_str().unwrap_or("unknown")) - .or_insert(0) += 1; - } - let raw_fallback_count = rows - .iter() - .filter(|row| row["lifecycle_plan"]["selected_raw_recompute"] == true) - .count(); - json!({"mode": name, "accuracy": accuracy, "lowering_ns": lowering_ns, "search_ns": search_ns, - "selection_ns": selection_ns, "query_count": query_texts.len(), "memo_groups": space.len(), - "coverage_counts": coverage_counts, "lifecycle_raw_fallback_count": raw_fallback_count, "queries": rows}) -} - -fn report(options: &Options, empirical: Option<&EmpiricalCostModel>) -> Value { - let mut corpora = vec![( - if options.queries.is_some() { - "custom" - } else { - "o11y_bench" - }, - queries(options.queries.as_deref().unwrap_or(CORPUS)), - )]; - if options.supplemental { - corpora.push(("supplemental_sketch_queries", queries(SUPPLEMENTAL))); - } - let corpora: Vec = corpora - .into_iter() - .map(|(name, queries)| { - let mut runs = vec![ - replay( - "exact", - &queries, - AccuracyTarget::Exact, - options, - &DefaultCostModel, - None, - ), - replay( - "default", - &queries, - AccuracyTarget::Epsilon(options.epsilon), - options, - &DefaultCostModel, - None, - ), - ]; - if let Some(model) = empirical { - runs.push(replay( - "empirical", - &queries, - AccuracyTarget::Epsilon(options.epsilon), - options, - model, - Some(&model.provider), - )); - } - json!({"name": name, "source": match name { - "o11y_bench" => "repository-vendored grafana/o11y-bench snapshot", - "custom" => "user-supplied PromQL query file", - _ => "local supplemental examples, not upstream o11y queries" - }, "runs": runs}) - }) - .collect(); - json!({"schema_version": 1, "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", - "empirical_context": empirical.map(|m| m.provider.context()), - "empirical_artifact": empirical.map(|m| json!({"schema_version": m.provider.artifact().schema_version, - "benchmark_version": m.provider.artifact().benchmark_version, "model_version": m.provider.artifact().model_version})), - "vendored_fixture_source": {"repository": "https://github.com/grafana/o11y-bench", "vendored_snapshot_date": "2026-07-17", "upstream_commit": null, - "note": "existing 27-query local fixture; upstream revision and scenario data were not provided"}, - "assumptions": {"evaluation_time_ms": options.now_ms, "evaluations_per_query": options.evaluations, - "data_arrival": "at_rest", "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", - "lifecycle_horizon_seconds": 3600, "runtime_capabilities": "hypothetical all supported, no runtime launched", - "timing": "single wall-clock sample; report/materialization timing includes JSON export"}, - "corpora": corpora}) -} - -fn main() -> Result<(), Box> { - let options = parse_options(std::env::args().skip(1))?; - let empirical = match (&options.evidence_path, &options.context_path) { - (Some(evidence), Some(context)) => { - let artifact: EvidenceArtifact = - serde_json::from_str(&std::fs::read_to_string(evidence)?)?; - let context: EvidenceContext = - serde_json::from_str(&std::fs::read_to_string(context)?)?; - Some(EmpiricalCostModel::new(EmpiricalEvidenceProvider::new( - artifact, context, - )?)) - } - _ => None, - }; - println!( - "{}", - serde_json::to_string_pretty(&report(&options, empirical.as_ref()))? - ); - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - - /// Invalid CLI numbers must fail before they can poison cost estimates. - #[test] - fn rejects_invalid_configuration() { - for value in ["NaN", "0", "1", "-1"] { - assert!(parse_options(["--epsilon".into(), value.into()]).is_err()); - } - assert!(parse_options(["--evaluations".into(), "0".into()]).is_err()); - } - - /// Real workload lowering alone never counts as sketch or deployment coverage. - #[test] - fn o11y_replay_records_all_queries_and_conservative_costs() { - let result = report(&Options::default(), None); - for run in result["corpora"][0]["runs"].as_array().unwrap() { - assert_eq!(run["query_count"], 27); - assert!(run["memo_groups"].as_u64().unwrap() > 0); - for row in run["queries"].as_array().unwrap() { - assert_ne!(row["coverage"], "rejected"); - assert_ne!(row["coverage"], "sketch_candidate"); - assert!(row["estimated_end_to_end_cpu_savings"].is_null()); - assert_eq!(row["lifecycle_plan"]["selected_raw_recompute"], true); - } - } - } - - /// Supplemental sketches and rejected syntax remain separately identifiable. - #[test] - fn sketches_and_rejections_are_explicit() { - let qs = vec!["quantile_over_time(0.95, latency[5m])".into(), "!!!".into()]; - let result = replay( - "default", - &qs, - AccuracyTarget::Epsilon(0.01), - &Options::default(), - &DefaultCostModel, - None, - ); - assert_eq!(result["queries"][0]["coverage"], "sketch_candidate"); - assert_eq!(result["queries"][1]["coverage"], "rejected"); - assert!(result["queries"][1]["reason"].is_string()); - } - - /// Count-over-time exercises the measured CMS/CountSketch configuration, - /// while its evidence remains absent unless an artifact is supplied. - #[test] - fn supplemental_count_exposes_frequency_sketch_candidates() { - let result = replay( - "default", - &queries("count_over_time(metric[5m])"), - AccuracyTarget::Epsilon(0.01), - &Options::default(), - &DefaultCostModel, - None, - ); - let families: Vec<_> = result["queries"][0]["candidates"] - .as_array() - .unwrap() - .iter() - .flat_map(|c| c["families"].as_array().unwrap()) - .collect(); - for algorithm in ["Cms", "CountSketch"] { - let family = families - .iter() - .find(|f| f["sketch"]["algorithm"] == algorithm) - .unwrap(); - assert_eq!(family["offline_evidence"]["status"], "unavailable"); - } - } -} diff --git a/crates/devtools/src/bin/offline_recommend.rs b/crates/devtools/src/bin/offline_recommend.rs deleted file mode 100644 index 3f6333f0..00000000 --- a/crates/devtools/src/bin/offline_recommend.rs +++ /dev/null @@ -1,28 +0,0 @@ -//! Evaluate an explicit offline error/resource requirement against measured data. -use asap_aware_mapping::empirical_comparison::{ - recommend_offline, OfflineComparisonEvidence, OfflineComparisonRequest, -}; - -fn main() -> Result<(), Box> { - let args: Vec<_> = std::env::args().skip(1).collect(); - if args.len() != 2 { - return Err("usage: offline_recommend COMPARISON-EVIDENCE.json REQUEST.json".into()); - } - let evidence: OfflineComparisonEvidence = - serde_json::from_str(&std::fs::read_to_string(&args[0])?)?; - let request: OfflineComparisonRequest = - serde_json::from_str(&std::fs::read_to_string(&args[1])?)?; - let recommendation = recommend_offline(&evidence, &request)?; - serde_json::to_writer_pretty( - std::io::stdout(), - &serde_json::json!({ - "schema_version":1, - "benchmark_version":evidence.sketch_evidence.benchmark_version, - "model_version":evidence.sketch_evidence.model_version, - "request":request, - "recommendation":recommendation, - "accuracy_scope":"observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee" - }), - )?; - Ok(()) -} diff --git a/docs/design_docs/empirical-o11y-execution-plan.md b/docs/design_docs/empirical-o11y-execution-plan.md deleted file mode 100644 index 0471529e..00000000 --- a/docs/design_docs/empirical-o11y-execution-plan.md +++ /dev/null @@ -1,60 +0,0 @@ -# Offline evidence and o11y planning evaluation - -Audience: developers reproducing issue #322 and the planner/control-plane evaluation. - -## Scope - -Use offline sketch-bench CPU, elapsed time, state/memory, disk (when measured), -and errors against offline ground truth. No runtime ground truth, posterior -feedback, or self-estimated accuracy is required. Offline accuracy observations -do not establish formal guarantees on unseen distributions. - -## Execution and ownership - -1. Pin isolated planner and control-plane worktrees from fetched main branches. - Preserve existing worktrees, including unresolved cost-model changes. -2. Evidence agent: implement the versioned artifact, validation, compatibility - matching, public cost-model integration, and fallback/decision tests. -3. Benchmark agent: run actual sketch-bench algorithms on uniform and Zipf - inputs, preserve raw output, export artifacts with source and environment - provenance, and document reproducible commands. -4. Replay agent: run the existing o11y PromQL corpus through actual planning, - export candidate coverage and planning latency, and separately identify - supplemental sketch workloads. -5. Integration owner: connect compatible evidence to the downstream control - plane, validate dependency compatibility, review other agents' changes, run - integration checks, and report evidence-supported comparisons. - -Steps 2–4 run concurrently after agreeing the artifact contract. Integration -uses their completed interfaces and measurements. Query-pattern changes are -limited to demonstrated blockers with regression coverage; unsupported query -semantics remain explicit in the report. - -## Acceptance - -- Versioned schema and example; explicit units, algorithm/configuration, - dataset/distribution, environment, collection/validity times, sample count, - dispersion, and benchmark/model provenance. -- At least two actual sketch algorithms measured offline on uniform and skewed - inputs. CPU is distinct from elapsed time; serialization size is distinct - from heap memory and disk I/O. Unmeasured fields stay unavailable. -- Matching evidence affects a public planning cost/ranking/lifecycle boundary. - Tests cover changed decisions, missing/stale/mismatched evidence, invalid - values, and unchanged accuracy guarantees. -- The planner and control-plane evaluation preserve exact fallbacks and expose - unsupported shapes, measured provenance, and limits on benefit estimates. -- Reproducible measurement and replay commands, raw machine-readable results, - and a concise report distinguish actual measurements from modeled totals. - -## Comparison rules - -Compare equivalent tasks, data, parameters, windows, horizons, and evaluation -cadences. Whole-plan estimates include build/update/readout, retained windows, -sharing, and raw residual work where evidence exists. Missing raw baseline or -physical evidence means an unavailable whole-plan speedup, not zero cost. -Microbenchmark algorithm comparisons are labeled separately. Disk usage and -network savings require their own measurements or explicit models. - -Repeated-query break-even can be computed only when compatible exact baseline, -sketch build/maintenance, and readout measurements are present. It is an offline -estimate and does not establish deployed end-to-end latency improvement. diff --git a/docs/offline-o11y-evaluation-2026-09-08.md b/docs/offline-o11y-evaluation-2026-09-08.md deleted file mode 100644 index c3f5b0f2..00000000 --- a/docs/offline-o11y-evaluation-2026-09-08.md +++ /dev/null @@ -1,135 +0,0 @@ -# Offline Sketch Evidence Integration and o11y Planning Evaluation - -> This document preserves the historical state of the first experiment, including -> its uncommitted changes, 24/27 binding result, and unmeasured construction/disk costs. -> See the [final report](offline-o11y-final-2026-09-08.md) for subsequent implementation, -> final results, and delivery status. - -## Execution Results - -Three agents worked in parallel on the offline evidence provider, real sketch-bench -measurements, and planner replay. The main agent completed control-plane integration, -version compatibility, and integration validation. See the -[execution plan](design_docs/empirical-o11y-execution-plan.md) for the full sequence. - -Implementation and measurements used isolated worktrees. Existing conflicts and -changes in the original workspace were left untouched: - -- Planner: `/mydata/asapplanner-empirical-o11y`, baseline `378a754`. -- Control plane: `/mydata/ASAPQuery-backend/.worktrees/empirical-o11y-322`, baseline `95131d8`. -- sketch-bench: `/mydata/sketch-bench-empirical-322`, pinned to `87f619e843fd2e4da784160d4e205a0d0d55f032`, with no source changes. - -No commits, pushes, PRs, or issue closures had been made at this stage. Changes in -both product worktrees remained available for local review. - -## Implemented Path for #322 - -1. A versioned JSON artifact, JSON Schema, explicitly labeled synthetic test fixture, and real measurement files. -2. Offline error, CPU, memory, distribution, exact parameters, environment, sample counts, variability, validity periods, and provenance. -3. An evidence-based ranking interface on the public `CostModel`, plus control-plane evidence lookup using its actual sizing parameters. -4. Ranking by update CPU when all candidates have compatible measurements; default ordering is preserved for missing, expired, ambiguous, or configuration/environment/distribution-incompatible evidence. -5. Tests showing that changing compatible evidence changes actual binding while preserving parameters and accuracy guarantees. Real measurements support the default CMS preference; no benefit or decision change was manufactured. - -This ranking minimizes per-update CPU, rather than a combined CPU/memory/disk -objective. Offline errors remain observations for their corresponding queries; -they are neither promoted to formal guarantees nor used directly to shrink sketches. -The lifecycle interface exposes only supported partial costs. A complete plan -remains unestimable when semantically matched readout, retention, retirement, or -raw/residual costs are missing. Realtime ground truth, self-estimated error, and -online feedback are outside this experiment's scope. - -## Data and Measurements - -The real sketch-bench compares CMS, CountSketch, and an exact Polars group-by + -HashMap frequency index. Each dataset contains 20,000 i64 keys drawn from a -key-space of 1,000 with seed 42. Uniform contains 1,000 distinct keys; Zipf -(exponent 1.1) contains 952. Each CPU measurement has five runs after two warmups. -Errors come from one offline accuracy experiment on each fixed dataset. - -| Distribution / algorithm | Update CPU (ns/item) | Read CPU (ns/key) | Retained / peak requested heap | Mean absolute relative frequency error | -| --- | ---: | ---: | ---: | ---: | -| Uniform CMS | 36.64 | 49.80 | 5,440 B | 163.47% | -| Uniform CountSketch | 1,179.19 | 3,813.40 | 9,960,000 B | 0 (this offline sample) | -| Zipf CMS | 35.68 | 44.33 | 5,440 B | 231.65% | -| Zipf CountSketch | 948.19 | 3,911.34 | 9,960,000 B | 0 (this offline sample) | - -CMS uses parameters 272 × 5; CountSketch uses 30,000 × 83. CMS's additive epsilon -bound is relative to total stream mass, not a 1% relative-error bound for each key. -The errors above must not be interpreted as satisfying the latter. CountSketch's -zero observed error does not guarantee zero error on other data. - -Memory is measured with an independent live-object probe that counts requested -heap bytes, excluding input data, allocator page overhead, and whole-process RSS. -Allocator differences between the CPU and memory probes are documented separately. -Disk usage, serialized size, and empty-sketch construction CPU were unmeasured -at this stage and remain null in this historical run. - -For 1,000 point-frequency queries after loading these datasets, the measured CPU -components sum to: - -| Dataset | CMS | Exact index | CountSketch | -| --- | ---: | ---: | ---: | -| Uniform | 0.783 ms | 0.741 ms | 27.397 ms | -| Zipf | 0.758 ms | 0.799 ms | 22.875 ms | - -These are offline component estimates that include exact-index preparation but -exclude unmeasured sketch construction. They therefore cannot establish a complete -break-even point or deployed speedup. The exact index's 290,816 B state footprint -comes from an upstream formula; its difference from requested heap must not be -called a measured reduction in total memory. See the -[measurement report and raw data](../tools/empirical-bench/results/MEASUREMENTS.md). - -## o11y Results - -The evaluation uses the repository's existing 27 PromQL fixtures: a vendored -snapshot from 2026-07-17, Git blob `ea2eee98d78c5c9354363dc378303d98ac141672`, -without a verifiable upstream commit. This experiment did not run the upstream -LLM-agent scoring benchmark or measure a real o11y data distribution. - -| Evaluation layer | Result | -| --- | --- | -| Planner query candidate coverage | 26/27 have exact-summary candidates; 1/27 falls back to raw; 0/27 have approximate-sketch candidates | -| Planner complete lifecycle selection | 27/27 conservatively fall back to raw because complete physical-cost evidence is missing | -| Control-plane parser + typed binder | Each of exact/default/empirical binds 24/27 and rejects 3/27 | -| Separate supplemental queries | Two quantile queries and one count_over_time query; both default and empirical modes can produce sketch candidates | -| Measurement applicability | CMS/CountSketch configurations for count_over_time match update-cost measurements; quantile measurements are missing | - -The three forms rejected by the control plane are a bare metric selector, -`sort_desc(...)`, and `... > 0`. These are not parser failures: the typed binder -at this stage has no corresponding bindable root candidate. Successful binding -also does not establish deployable execution; some bound results still fall back -to raw queries. Concat metadata handling and Summary BinaryOp compatibility were -added to connect the newer Planner. Binary operations unsupported by the warm tier -retain an explicit fallback. - -Measured evidence did not change o11y selection because these queries have no -corresponding sketch candidates. CMS update CPU is substantially lower for the -supplemental query, so empirical ranking preserves CMS first. Offline point-frequency -error is not treated as count_over_time or o11y result error. - -Complete-query CPU and memory benefits are null. Quantifying o11y benefits in the -next stage requires measurements of exact-summary and raw/residual operators on -the corresponding metric data, group cardinalities, windows, and execution -frequencies, followed by complete physical-cost comparison. Adding only more -sketch-algorithm measurements cannot supply those missing inputs. - -## Validation and Reproduction - -- Planner mapping unit tests: 342 passed. -- Planner replay: four passed; see the benchmark README for export normalization tests. -- All control-plane library unit tests: 633 passed. -- New control-plane integration tests: three passed, covering changed binding, conservative fallback, and binary-operation fallback. -- Other agents cross-checked the provider, replay, control-plane integration, and benchmark measurement semantics. - -Reproduction entry points: - -- [Real benchmark commands and measurement methods](../tools/empirical-bench/README.md) -- [Planner replay commands](user-guide/o11y-replay.md) -- Control plane: `tools/run-offline-planner-replay.py` and - `control_plane/docs/offline-sketch-evidence.md` in its worktree. -- Output directory: `tools/empirical-bench/results/`, containing Uniform/Zipf - evidence, contexts, planner replay, and control-plane replay. Control-plane - reports record the actual commands and both repository revisions. - -These results are reproducible offline experiments and a planning-coverage report, -not conclusions about online end-to-end performance. diff --git a/docs/offline-o11y-final-2026-09-08.md b/docs/offline-o11y-final-2026-09-08.md deleted file mode 100644 index 501431c1..00000000 --- a/docs/offline-o11y-final-2026-09-08.md +++ /dev/null @@ -1,89 +0,0 @@ -# Offline Sketch Evidence and o11y: Final Report - -Audience: developers. This report covers the offline evidence path for #322, -without real-time error feedback. The original dirty working directory was left unchanged. - -## Completed Integration - -- Versioned artifacts, JSON Schema, and a public CostModel provider match parameters, query semantics, distributions, environments, and validity intervals. Unknown measurements remain unavailable. -- Actual CMS/CountSketch parameter sweeps measure offline error, separate construction/update/read/merge CPU, live heap allocations, serialized size, and allocated file blocks. -- Fixed-snapshot point-frequency comparisons use explicit observed-error thresholds, formal parameter minima, CPU/retained byte-seconds weights, and an exact baseline on the same data. -- The backend filters unsupported layouts before recommending and binding frequency configurations. When exact execution wins or evidence is insufficient, it preserves the original query without silently rounding selected parameters. -- o11y planner/control-plane replay and exact fixed-snapshot reference measurements cover seven explicitly supported queries. - -For interfaces and reproduction instructions, see the [evidence contract](developer_docs/offline-sketch-evidence.md), -[benchmark commands](../tools/empirical-bench/README.md), and [replay guide](user-guide/o11y-replay.md). - -## Measured Results - -sketch-bench is pinned to revision `87f619e843fd2e4da784160d4e205a0d0d55f032`. -The uniform and Zipf datasets each contain 20,000 i64 keys, with a key space of -1,000, seed 42, and Zipf exponent 1.1. There are 18 sketch configurations and -two exact baselines; CPU measurements use five trials after two warmups. -Accuracy comes from one offline experiment per fixed dataset, not a guarantee -across distributions or real-time ground truth. The comparison assumes one -build, 1,000 queries, 300 seconds of retention, and no merges. - -| Scenario | Uniform / Zipf results | -| --- | --- | -| CPU-only, with a 1% or 5% observed mean relative-error limit | Both select exact execution; no sketch CPU benefit | -| Generic comparator, with memory weighting | CMS 2720×5; retained heap decreases by 81.68%, while CPU increases by approximately 0.037 / 0.182 ms, respectively | -| Backend-compatible configuration, with memory weighting | CMS 4096×5; retained heap decreases by approximately 72.4%, while CPU also increases | - -The memory-weighted objective is `CPU ns + 0.01 × retained byte-seconds`. These -weights express an illustrative preference, not a conversion measured from -hardware. Exact retained heap is 296,976 B; CMS 2720×5 uses 54,400 B, and -4096×5 uses 81,920 B. Memory figures measure requested allocation bytes using -a separate System allocator probe; CPU measurements use jemalloc. These memory -figures are not process RSS. Serialized size and allocated file blocks do not -establish disk-throughput benefits. - -See the [final sweep report](../tools/empirical-bench/results-sweep/MEASUREMENTS.md). -Earlier frequency measurements and control-plane replay in `results/` remain -as the initial baseline. Final frequency comparisons and control-plane results -use `results-sweep/`; costs from the two runs must not be mixed. - -## o11y Coverage and Limitations - -The replay reuses the repository's existing 27 PromQL fixtures. It does not run -upstream LLM-agent scoring or use real scenario data. - -| Check | Result | -| --- | --- | -| Planner candidate coverage | 26/27 have exact summary candidates; 1/27 uses raw fallback; no sketch candidates | -| Complete lifecycle costs in the original replay | Insufficient evidence; all 27/27 conservatively fall back to raw execution | -| Control-plane exact/default/empirical binding | All three modes bind 27/27 successfully; each retains the original query in 5 root plans | -| Seven exact reference queries | Raw execution and cached-result reads are measured on fixed synthetic gauge snapshots, using the public CostModel and actual selection flow | -| Remaining 20 queries | No complete reference implementation; benefits remain unavailable | - -New fallbacks preserve the original IR for selector, sort, and comparison/filter -roots, increasing successful binding from 24/27 to 27/27. Binding does not mean -every plan is executable by the summary executor. Column updates in the new IR -are supported; keyed/non-column updates and warm-tier BinaryOp remain explicitly rejected. - -The seven reference queries cover instant sums, window maxima, and sums of -window averages: 300 series, three jobs, one finite gauge sample per minute, -and 60 repeated reads of the same snapshot. The retained state is the complete -exact query result, not a sliding window with advancing time. Measurements -exclude network, disk, protocol serialization, and output-label materialization; -memory figures count logical value bytes. Benefits from repeated reads cannot -be extrapolated to production end-to-end speedups. Machine-readable results are -available in the [exact snapshot experiment](../tools/empirical-bench/results/o11y-exact-snapshot.json). - -Quantile measurements, real o11y traces, time drift, post-merge error, online -update and retirement costs, and complete production benefits remain outside -this coverage. Point-frequency error cannot be applied to quantiles or count_over_time. - -## Validation and Delivery - -- Planner mapping: 349 unit tests pass. -- Devtools: 3 exact benchmark tests and 4 replay tests pass; the recommendation CLI is verified with six actual requests. -- Benchmark export: 5 Python tests pass. -- Backend: 633 control-plane and 973 data-plane library tests pass; 7 new integration tests pass. -- Agents cross-reviewed the provider, measurement, and binding code; artifact text, JSON, source hashes, and provenance were checked successfully. - -The backend pins the published planner core commit -`dfdf6b5c1f7d667394a4ea1f56fb3786af04228d`. Normal builds and final replay do not -require local Cargo source patches. Source code, tools, and results are delivered -through coordinated PRs in the two repositories, without automatically merging -them or closing the issue. diff --git a/docs/user-guide/o11y-replay.md b/docs/user-guide/o11y-replay.md deleted file mode 100644 index dd72e29b..00000000 --- a/docs/user-guide/o11y-replay.md +++ /dev/null @@ -1,103 +0,0 @@ -# Offline o11y workload replay - -For users evaluating planner coverage using offline sketch-bench evidence. -`o11y_replay` runs the existing 27-query o11y fixture through lowering, -workload-wide candidate search, accuracy checks, selection and summary lifecycle -planning. It launches no data plane or downstream control-plane server. - -```sh -cargo run -p asap-devtools --bin o11y_replay -- --supplemental > replay.json -cargo run -p asap-devtools --bin o11y_replay -- \ - --supplemental --evidence planner-evidence.json --context context.json > empirical-replay.json -``` - -The first command compares exact requirements with the default approximate -planner (`--epsilon 0.01`). The second adds an empirical planning run using a -versioned offline evidence artifact and an explicit applicability context. -The context JSON contains `distribution`, `environment`, and -`now_unix_seconds`; copy the full descriptors of the intended offline dataset -and execution environment, and choose the evidence evaluation time explicitly. -Configuration, distribution, environment and validity dates must match. -An absent measurement stays unavailable and falls back to default planning. - -`--queries FILE` accepts one PromQL query per nonblank, noncomment line. -`--evaluations 60` models repeated reads of the same fixed historical input; -`--now-ms 1788825600000` fixes the as-of time. These are scenario assumptions, -not timings extracted from o11y task execution. Query windows, subqueries and -offsets remain encoded in the query IR. The lifecycle horizon is one hour and -the assumed data is at rest. `--supplemental` adds two quantile queries and a -`count_over_time` query as a separate corpus. Its total sample count has different -readout semantics from integer-stream point-frequency sketch-bench data; matching -sketch configuration does not establish matching query readout/error semantics. - -The JSON distinguishes: - -- `coverage`: whether a reachable site has a sketch candidate, exact summary - candidate, exact fallback, or a lowering rejection. Candidate coverage does - not establish that the whole query can execute from summaries. -- `root_plan` and `lifecycle_plan`: selected root structure and deployable - lifecycle result. Missing complete costs can make lifecycle planning retain - exact recomputation despite available sketch candidates. -- `offline_evidence`: matched primitive measurements and provenance, or an - explicit missing/incompatible/stale reason. Error statistics remain offline - observations for the measurement's recorded query, separate from the - planner's formal result guarantee. -- `heuristic_score`: a dimensionless planner score, never CPU nanoseconds. - Search and selection wall-clock timings are one local sample. Reporting and - materialization timings include JSON export work. -- End-to-end resource savings: `null` until complete raw execution, residual - operators, grouping cardinalities, sharing and deployment costs exist. Do not - divide heuristic scores to claim runtime speedup, or sum nested candidate - costs as a whole-query cost. - -The fixture identifies an upstream snapshot date, not an upstream commit; this -tool retains that limitation explicitly. It reuses the repository's existing -fixture, whose provenance is documented there. It does not claim to run the -upstream agent benchmark or its scenario data. - -## Measure supported exact-query reference implementations - -```sh -cargo run --release -p asap-devtools --bin o11y_exact_bench -- 300 60 > exact-snapshot.json -``` - -This profiles seven explicitly admitted o11y queries: instantaneous sums, -per-series window maxima, and a sum of per-series window averages. The synthetic -dataset has 300 series across three job labels, finite gauge values, and one -sample per minute inside the selected window. The 60 invocations repeat the -identical immutable snapshot and evaluation time. They are not advancing live -windows. Unsupported queries are reported as unavailable. - -The reference deployment retains the complete exact result of an admitted root -summary. It measures the raw value kernel and the retained result read separately -with a process CPU clock, and estimates one build plus repeated reads against -repeated raw execution. Both timed kernels include result allocation/destruction; -charging the build this way is conservative because its result is actually -retained. Only the profiled exact SummaryAgg signatures receive costs through -the public CostModel boundary; actual search, global selection, and root -materialization determine the reported choice. Unprofiled candidates and raw -fallback nodes never inherit those costs. - -The output identifies this as a Rust reference implementation, not the deployed -backend. It includes filtering and value reduction/readout but excludes disk, -network, protocol serialization and shared output-label materialization. Memory -is logical stored value bytes, not measured process RSS or a claim that raw data -can be deleted. Large savings from reusing identical results do not establish -the benefit of live sliding-window maintenance. - -## Compare query-matched sketch configurations - -```sh -cargo run -p asap-devtools --bin offline_recommend -- \ - tools/empirical-bench/results-sweep/comparison-evidence.json \ - tools/empirical-bench/results-sweep/request-uniform-are001.json -``` - -The companion comparison artifact includes disjoint construction, ingestion, -prepare and read CPU evidence for the exact frequency index and sketch rungs. -The request declares its offline observed-error criterion, fixed snapshot, -probe population, formal parameter minima if applicable, and resource weights. -The JSON reports accepted and rejected configurations, the exact reference, -selection, and dimensional tradeoffs. CPU-only and memory-weighted requests can -choose different plans. These point-frequency observations do not price or -bound error for the o11y gauge queries above. diff --git a/tools/empirical-bench/README.md b/tools/empirical-bench/README.md deleted file mode 100644 index 7e7a3463..00000000 --- a/tools/empirical-bench/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# Offline sketch-bench evidence (developer guide) - -This driver runs ProjectASAP/sketch-bench's real `approxbench` CLI and adapts its -schema-v5 reports to the planner's versioned evidence schema. It measures CMS and -CountSketch using `asap_sketchlib` RegularPath/Vector2D plus an exact Polars -frequency baseline, on deterministic uniform and Zipf streams. No collector, -query backend, runtime ground truth, or runtime error feedback is involved. - -```bash -git clone https://github.com/ProjectASAP/sketch-bench.git /path/to/sketch-bench -git -C /path/to/sketch-bench checkout 87f619e843fd2e4da784160d4e205a0d0d55f032 -(cd /path/to/sketch-bench && cargo build --release --locked -p aqpbm-cli) -python3 tools/empirical-bench/run.py --bench-repo /path/to/sketch-bench --output /tmp/offline-evidence --sweep -python3 -m unittest discover -s tools/empirical-bench -p 'test_*.py' -``` - -Build from the sketch-bench directory so its `.cargo/config.toml` applies -`target-cpu=native`, as in the checked-in run. The driver records the source -revision, dirty status, executable checksum, full invocations, compiler, CPU, -OS, implementation, and parameters. It pins Polars to one worker. Five measured -runs follow two warmups per timed operation by default. Upstream accuracy executes -one offline truth comparison for the fixed generated dataset, recorded as -`error.trials=1`; it is run separately because accuracy of insert is undefined. -These timings are repeated observations -within one process, not independent experiments: standard deviations are reported, -but no confidence interval or cross-distribution guarantee is inferred. -`manifest.json.runtime_provenance` distinguishes observed host metadata and the -driver's enforced thread setting from declared build preconditions. The runtime -string's release/native/jemalloc settings describe the documented required build; -the driver does not independently recover compiler or allocator flags from the -executable. Its SHA-256 identifies that binary without proving those build flags. -The checked-in run used a shared development host without CPU affinity or an -exclusive core reservation; timing estimates should be remeasured on deployment -hardware before using them for capacity decisions. - -Outputs: - -- `raw.json`: unmodified per-invocation sketch-bench flat reports, including wall - times, CPU user/system samples, process RSS/allocator readings, and all errors. -- `manifest.json`: execution and environment provenance. -- `operation-reports.json`: original reports before upstream flattening; preserve - per-operation memory, including exact prepared-index state. -- `memory-probe.json`: requested-allocation samples with each live sketch, using - the same library and upstream data generator on identical inputs. -- `planner-evidence.json`: normalized sketch measurements, with unknowns null. -- `exact-baselines.json`: exact frequency index costs on the same input. -- `resource-probe.json`: disjoint live-state construction/update/read/merge CPU, - actual serialized snapshot size and allocated filesystem blocks. -- `comparison-evidence.json`: query-bound sketch records and exact baselines; - its required `disjoint_live_state_v1` timing contract excludes duplicate setup - and destruction charges. -- `request-*.json`: fixed-snapshot CPU-only comparisons at 1%/5% observed mean - relative error, plus an explicitly illustrative memory-weighted comparison. - -The default sketch parameters match formal planner sizing for epsilon=0.01, delta=0.01: -CMS width 272, depth 5; CountSketch width 30,000, depth 83. Input defaults to -20,000 i64 keys, key-space size 1,000, seed 42; Zipf exponent is 1.1. Actual -distinct-key counts come from the ground-truth probe population. Errors are -average absolute relative point-frequency errors over **all distinct keys**. -They are not error of a total COUNT, or a formal epsilon bound. Aggregate error -over repeated deterministic inputs does not establish a confidence interval. -`--sweep` additionally measures CMS widths 512/2720/4096/27200/32768 (depth 5) -and CountSketch widths 300/3000 (depth 83). The power-of-two CMS widths support -the backend frequency extension's actual parameter constraints. An offline -accuracy threshold does not authorize deployment below formal minimum sizes. - -Original upstream CPU reports use paired user+system samples and preserve wrapper -allocation/destruction overhead. The current comparison exporter instead uses -`resource_probe.rs`, linked to the exact release libraries and jemalloc. It times -live-state phases separately with `CLOCK_PROCESS_CPUTIME_ID`: empty constructor, -updates, exact prepare, reads, and sketch merge. Holder allocation and destruction -are outside the constructor timer; constructors/destructors are outside the other -phase timers. Queries cover every distinct key ten times against an unchanged -snapshot, in a reproducible rotated sorted order. The exact implementation is -the upstream public `PolarsFrequencyCore`, not a replacement algorithm. -The model's scope ends with state retained after reading; retirement is excluded -on both sides. Wall time remains in upstream raw reports and is never called CPU. - -`retained_bytes` and `peak_bytes` use the companion `memory_probe.rs`, linked to -the exact release libraries built by sketch-bench. Its counting System allocator -measures requested heap allocation bytes across construction and insertion, -keeping the sketch alive at the final snapshot; input generation is outside -the measurement. This is independent of allocator-resident pages and does not -measure jemalloc overhead. Five runs must release every sketch allocation after -destruction. CPU results come from a separate uninstrumented jemalloc probe. -The exact heap probe warms Polars twice, then measures construction/ingestion/ -prepare with the exact state alive. Its readings are accepted only when every -post-destruction allocation balance returns to zero; otherwise the exact footprint -stays explicitly formula based. `--export-only --refresh-memory` refreshes this -heap evidence without rerunning or replacing CPU timings. -Upstream counter-storage formula, process RSS and allocator readings remain in -raw reports only. The resource probe calls the actual `serialize_to_bytes` API -and verifies estimate-equivalent deserialization for every input key. It writes -one snapshot to a fresh local temporary file, flushes it, and records allocated -blocks times 512 separately from logical byte length; the file is then removed. -Directory/inode overhead and a runtime write schedule are outside this disk -measurement. State bytes are never substituted for disk usage. Validity is a -30-day reproducibility policy, not a statistical claim of future applicability. - -The exact baseline inserts the input into a buffer, then `prepare` executes -Polars group-by/count and creates a HashMap. Reads query that prepared exact -index. Compare `empty_build + (insert_per_item * N) + prepare + Q * read` with -sketch `empty_build + (update_per_item * N) + Q * read`. All components use -disjoint timed regions. A sketch can save state while losing CPU to this exact index. -These comparisons are offline point-frequency microbenchmarks; they do not -measure an o11y PromQL query or end-to-end deployed speedup. - -`results/` preserves the earlier partial run whose constructor/disk/serialization -were unknown. `results-sweep/` contains the complete frequency component run; -its additional probe must not retroactively change the earlier measurements. diff --git a/tools/empirical-bench/memory_probe.rs b/tools/empirical-bench/memory_probe.rs deleted file mode 100644 index 7564fbe4..00000000 --- a/tools/empirical-bench/memory_probe.rs +++ /dev/null @@ -1,101 +0,0 @@ -//! Counts requested allocation bytes with each sketch alive; input generation is excluded. -use std::alloc::{GlobalAlloc, Layout, System}; -use std::sync::atomic::{AtomicUsize, Ordering::Relaxed}; -use asap_sketchlib::{Count, CountMin, DataInput, RegularPath, Vector2D}; - -struct Tracking; -static LIVE: AtomicUsize = AtomicUsize::new(0); -static PEAK: AtomicUsize = AtomicUsize::new(0); -fn account(bytes: usize) { - let live = LIVE.fetch_add(bytes, Relaxed) + bytes; - PEAK.fetch_max(live, Relaxed); -} -unsafe impl GlobalAlloc for Tracking { - unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - let ptr = unsafe { System.alloc(layout) }; - if !ptr.is_null() { account(layout.size()); } - ptr - } - unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { - let ptr = unsafe { System.alloc_zeroed(layout) }; - if !ptr.is_null() { account(layout.size()); } - ptr - } - unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - unsafe { System.dealloc(ptr, layout) }; - LIVE.fetch_sub(layout.size(), Relaxed); - } - unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, size: usize) -> *mut u8 { - let next = unsafe { System.realloc(ptr, layout, size) }; - if !next.is_null() { - if size >= layout.size() { account(size - layout.size()); } - else { LIVE.fetch_sub(layout.size() - size, Relaxed); } - } - next - } -} -#[global_allocator] -static ALLOCATOR: Tracking = Tracking; - -fn main() { - let path = std::env::args().nth(1).expect("raw.json path"); - let rows: Vec = serde_json::from_slice(&std::fs::read(path).unwrap()).unwrap(); - let mut results = Vec::new(); - for row in rows { - let description: aqpbm_datagen::TableDescription = serde_json::from_value(row["workload"]["synthetic"]["description"].clone()).unwrap(); - let items = description.generate().unwrap().into_column(0).unwrap().into_i64().unwrap(); - if row["impl"] == "polars" { - use sketch_bench::wrappers::polars_shared::PolarsFrequencyCore; - // Initialize Polars' worker/cache state before attributing bytes to one live index. - for _ in 0..2 { - let mut warm = PolarsFrequencyCore::::default(); - for item in &items { warm.update(item); } - warm.finalize(); - } - let mut samples = Vec::with_capacity(5); - let mut cleanup_deltas = Vec::with_capacity(5); - for _ in 0..5 { - let baseline = LIVE.load(Relaxed); - PEAK.store(baseline, Relaxed); - let mut state = PolarsFrequencyCore::::default(); - for item in &items { state.update(item); } - state.finalize(); - std::hint::black_box(&state); - let sample = (LIVE.load(Relaxed).saturating_sub(baseline), PEAK.load(Relaxed).saturating_sub(baseline)); - drop(state); - cleanup_deltas.push(LIVE.load(Relaxed) as i64 - baseline as i64); - samples.push(sample); - } - results.push(serde_json::json!({"sketch": row["sketch"], "impl": "polars", - "workload": row["workload"], "sketch_config": row["sketch_config"], "samples": samples, - "cleanup_deltas": cleanup_deltas, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages"})); - continue; - } - let depth = row["sketch_config"]["params"]["rows"].as_u64().unwrap() as usize; - let width = row["sketch_config"]["params"]["cols"].as_u64().unwrap() as usize; - let cms = row["sketch"].as_str().unwrap().starts_with("cms-"); - let mut samples = Vec::with_capacity(5); - for _ in 0..5 { - let baseline = LIVE.load(Relaxed); - PEAK.store(baseline, Relaxed); - // The sketch remains alive at both snapshots, unlike a consuming benchmark closure. - let (retained, peak) = if cms { - let mut sketch = CountMin::, RegularPath>::with_dimensions(depth, width); - for item in &items { sketch.insert(&DataInput::I64(*item)); } - std::hint::black_box(&sketch); - (LIVE.load(Relaxed) - baseline, PEAK.load(Relaxed) - baseline) - } else { - let mut sketch = Count::, RegularPath>::with_dimensions(depth, width); - for item in &items { sketch.insert(&DataInput::I64(*item)); } - std::hint::black_box(&sketch); - (LIVE.load(Relaxed) - baseline, PEAK.load(Relaxed) - baseline) - }; - assert_eq!(LIVE.load(Relaxed), baseline, "sketch destruction must release its allocations"); - samples.push((retained, peak)); - } - results.push(serde_json::json!({"sketch": row["sketch"], "impl": "lib", "workload": row["workload"], "sketch_config": row["sketch_config"], - "samples": samples, "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages"})); - } - println!("{}", serde_json::to_string_pretty(&results).unwrap()); -} diff --git a/tools/empirical-bench/resource_probe.rs b/tools/empirical-bench/resource_probe.rs deleted file mode 100644 index e1a17629..00000000 --- a/tools/empirical-bench/resource_probe.rs +++ /dev/null @@ -1,138 +0,0 @@ -//! Complements sketch-bench with empty construction CPU and actual persisted snapshot size. -use std::hint::black_box; -use std::io::Write; -use std::os::unix::fs::MetadataExt; -use asap_sketchlib::{Count, CountMin, DataInput, RegularPath, Vector2D}; - -#[global_allocator] -static ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; - -fn cpu_ns() -> u64 { - #[repr(C)] - struct Timespec { tv_sec: std::os::raw::c_long, tv_nsec: std::os::raw::c_long } - extern "C" { fn clock_gettime(clock_id: std::os::raw::c_int, time: *mut Timespec) -> std::os::raw::c_int; } - // Linux CLOCK_PROCESS_CPUTIME_ID; this companion also uses Linux allocated blocks. - assert!(cfg!(target_os = "linux")); - let mut time = Timespec { tv_sec: 0, tv_nsec: 0 }; - assert_eq!(unsafe { clock_gettime(2, &mut time) }, 0); - time.tv_sec as u64 * 1_000_000_000 + time.tv_nsec as u64 -} - -fn construction(mut build: impl FnMut() -> T, batch: usize) -> Vec { - let mut samples = Vec::with_capacity(5); - for run in 0..7 { - let mut alive = Vec::with_capacity(batch); - let start = cpu_ns(); - for _ in 0..batch { alive.push(black_box(build())); } - let elapsed = cpu_ns() - start; - if run >= 2 { samples.push(elapsed as f64 / batch as f64); } - // Empty objects remain alive until after the timed construction batch. - black_box(&alive); - drop(alive); - } - samples -} - -fn live_phases(items: &[i64], build: impl Fn() -> T, insert: impl Fn(&mut T, i64), - read: impl Fn(&T, i64) -> f64, prepare: impl Fn(&mut T), - merge: Option) -> serde_json::Value { - let mut keys: Vec<_> = items.iter().copied().collect::>().into_iter().collect(); - // Fixed rotation avoids sorted probe order without introducing another RNG definition. - if !keys.is_empty() { let mid = keys.len() / 2; keys.rotate_left(mid); } - let mut updates = Vec::with_capacity(5); - let mut prepares = Vec::with_capacity(5); - let mut reads = Vec::with_capacity(5); - let mut merges = Vec::with_capacity(5); - for run in 0..7 { - let mut state = build(); - let start = cpu_ns(); - for item in items { insert(&mut state, black_box(*item)); } - let update = (cpu_ns() - start) as f64 / items.len() as f64; - let start = cpu_ns(); - prepare(&mut state); - let prepare = (cpu_ns() - start) as f64; - let start = cpu_ns(); - for _ in 0..10 { for key in &keys { black_box(read(&state, black_box(*key))); } } - let query = (cpu_ns() - start) as f64 / (keys.len() * 10) as f64; - let merge_time = merge.map(|merge| { - let mut other = build(); - for item in items { insert(&mut other, *item); } - let start = cpu_ns(); - merge(&mut state, &other); - (cpu_ns() - start) as f64 - }); - if run >= 2 { - updates.push(update); prepares.push(prepare); reads.push(query); - if let Some(time) = merge_time { merges.push(time); } - } - black_box(&state); - } - serde_json::json!({"update_cpu_ns_samples": updates, "prepare_cpu_ns_samples": prepares, - "read_cpu_ns_samples": reads, "merge_cpu_ns_samples": merges, - "query_distinct_keys": keys.len(), "query_passes": 10, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order"}) -} - -fn main() { - let args: Vec = std::env::args().collect(); - let rows: Vec = serde_json::from_slice(&std::fs::read(&args[1]).unwrap()).unwrap(); - let directory = std::path::Path::new(&args[2]); - let mut results = Vec::new(); - for (index, row) in rows.into_iter().enumerate() { - let description: aqpbm_datagen::TableDescription = serde_json::from_value(row["workload"]["synthetic"]["description"].clone()).unwrap(); - let items = description.generate().unwrap().into_column(0).unwrap().into_i64().unwrap(); - if row["impl"] == "polars" { - use sketch_bench::wrappers::polars_shared::PolarsFrequencyCore; - let samples = construction(PolarsFrequencyCore::::default, 4096); - let phases = live_phases(&items, PolarsFrequencyCore::::default, - |s, x| s.update(&x), |s, x| s.query(&x) as f64, |s| s.finalize(), None); - results.push(serde_json::json!({"sketch": row["sketch"], "impl": row["impl"], - "workload": row["workload"], "sketch_config": row["sketch_config"], - "build_cpu_ns_samples": samples, "build_batch": 4096, - "phases": phases, - "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded"})); - continue; - } - let depth = row["sketch_config"]["params"]["rows"].as_u64().unwrap() as usize; - let width = row["sketch_config"]["params"]["cols"].as_u64().unwrap() as usize; - let batch = (16_000_000 / (depth * width * 4)).clamp(2, 256); - let (samples, serialized, phases) = if row["sketch"].as_str().unwrap().starts_with("cms-") { - let samples = construction(|| CountMin::, RegularPath>::with_dimensions(depth, width), batch); - let phases = live_phases(&items, || CountMin::, RegularPath>::with_dimensions(depth, width), - |s,x| s.insert(&DataInput::I64(x)), |s,x| s.estimate(&DataInput::I64(x)) as f64, |_| {}, Some(CountMin::, RegularPath>::merge)); - let mut sketch = CountMin::, RegularPath>::with_dimensions(depth, width); - for item in &items { sketch.insert(&DataInput::I64(*item)); } - let bytes = sketch.serialize_to_bytes().unwrap(); - let restored = CountMin::, RegularPath>::deserialize_from_bytes(&bytes).unwrap(); - for item in &items { assert_eq!(sketch.estimate(&DataInput::I64(*item)), restored.estimate(&DataInput::I64(*item))); } - (samples, bytes, phases) - } else { - let samples = construction(|| Count::, RegularPath>::with_dimensions(depth, width), batch); - let phases = live_phases(&items, || Count::, RegularPath>::with_dimensions(depth, width), - |s,x| s.insert(&DataInput::I64(x)), |s,x| s.estimate(&DataInput::I64(x)), |_| {}, Some(Count::, RegularPath>::merge)); - let mut sketch = Count::, RegularPath>::with_dimensions(depth, width); - for item in &items { sketch.insert(&DataInput::I64(*item)); } - let bytes = sketch.serialize_to_bytes().unwrap(); - let restored = Count::, RegularPath>::deserialize_from_bytes(&bytes).unwrap(); - for item in &items { assert_eq!(sketch.estimate(&DataInput::I64(*item)), restored.estimate(&DataInput::I64(*item))); } - (samples, bytes, phases) - }; - let path = directory.join(format!("snapshot-{index}.msgpack")); - let mut file = std::fs::OpenOptions::new().write(true).create_new(true).open(&path).unwrap(); - file.write_all(&serialized).unwrap(); - file.sync_all().unwrap(); - let metadata = file.metadata().unwrap(); - assert_eq!(metadata.len(), serialized.len() as u64); - let disk_bytes = metadata.blocks() * 512; - drop(file); - std::fs::remove_file(path).unwrap(); - results.push(serde_json::json!({"sketch": row["sketch"], "impl": row["impl"], - "workload": row["workload"], "sketch_config": row["sketch_config"], - "build_cpu_ns_samples": samples, "build_batch": batch, - "phases": phases, - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "serialized_bytes": serialized.len(), "disk_bytes": disk_bytes, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand"})); - } - println!("{}", serde_json::to_string_pretty(&results).unwrap()); -} diff --git a/tools/empirical-bench/results-sweep/MEASUREMENTS.md b/tools/empirical-bench/results-sweep/MEASUREMENTS.md deleted file mode 100644 index 06400224..00000000 --- a/tools/empirical-bench/results-sweep/MEASUREMENTS.md +++ /dev/null @@ -1,79 +0,0 @@ -# Complete offline frequency component comparison - -Audience: planner developers reviewing empirical cost and accuracy decisions. - -This run measures 18 frequency sketch configurations and two exact references -using the actual pinned sketch-bench library stack. Uniform and Zipf inputs each -contain 20,000 i64 keys from a key-space of 1,000, seed 42; Zipf exponent is 1.1. -There are six CMS widths (272, 512, 2720, 4096, 27200, 32768), all at depth 5, -and three CountSketch widths (300, 3000, 30000), all at depth 83. Every timing -has five samples after two warmups. Offline accuracy is one fixed-input trial, -not a distribution-wide or realtime guarantee. - -Unlike the earlier `../results/` run, this comparison measures empty construction -and uses disjoint live-state CPU phases for both sketch and exact reference. -The companion calls the same library implementations directly: constructors -are outside update/read timing, state remains alive throughout each phase, and -destruction occurs after timing stops. Exact `prepare` uses the real upstream -`PolarsFrequencyCore::finalize` (Polars group-by/count plus HashMap). -The cost model ends with state retained after the reads; it does not include -retirement, persistence I/O CPU, interleaved updates, or merged-state accuracy. -No query-frequency break-even is claimed outside this fixed-snapshot workload. - -The six request files are explicit scenarios: 20,000 input keys, 1,000 lookups, -one retained state over 300 seconds, no merges. All-key average read cost and -mean absolute relative frequency error apply to precisely that probe population. -CPU-only requests impose 1% or 5% observed mean error. Memory-weighted requests -use the illustrative objective `CPU ns + 0.01 * retained byte-seconds`, a 1% -observed mean error threshold, and a formal CMS minimum of width 512/depth 5. -The weight is a caller preference, not a measured hardware exchange rate. - -| Distribution | CPU-only result (both error budgets) | Exact CPU estimate | Memory-weighted selected sketch | Sketch CPU estimate | CPU penalty for choosing sketch | -| --- | --- | ---: | --- | ---: | ---: | -| Uniform | Exact Polars + HashMap | 0.7033 ms | CMS width 2720, depth 5 | 0.7404 ms | +0.0371 ms | -| Zipf | Exact Polars + HashMap | 0.5446 ms | CMS width 2720, depth 5 | 0.7270 ms | +0.1824 ms | - -The memory-weighted choice saves retained state at the expense of CPU. It is -not a speedup. CMS width 2720 retains 54,400 requested heap bytes and has observed -mean relative errors 0.0063 / 0.0074. Smaller CMS width 512 has approximately -48.6% / 49.1% observed relative error, so it fails either strict error request. -CMS width 4096 has zero observed error on these two inputs, not a zero-error -guarantee. CountSketch's smaller rungs are offline alternatives; observed error -does not authorize using them below formal deployment sizes. - -Backend selection additionally filters to supported power-of-two CMS widths -before recommendation. Consequently the generic offline width-2720 recommendation -cannot be bound by rounding it after selection. The separate backend integration -report records the actual supported choice (or preserves exact execution). - -Snapshot size is now measured: CMS width 2720 serializes to 13,781 bytes on -Uniform and 13,933 bytes on Zipf; each flushed snapshot file occupies 16,384 -allocated filesystem bytes in this environment. The probe verifies deserialization -preserves all input-key estimates. Filesystem block allocation is separate from -logical serialization size and from requested heap bytes. Temporary snapshot -files are removed after measurement. These sizes do not imply any runtime write -schedule or measured disk-throughput benefit. - -The exact heap probe completed five clean lifecycles per distribution, with zero -allocation balance remaining after every state was destroyed. Exact retained -requested heap is 296,976 bytes on both distributions; construction/ingestion/ -prepare peak is 628,344 bytes on Uniform and 626,584 bytes on Zipf. These measured -values are used by the comparison instead of the older 290,816-byte footprint -formula. The selected CMS width-2720 state therefore saves 242,576 retained bytes -(81.68%) against this matched exact reference, while incurring the CPU penalties -shown above. - -The memory probe uses a separate counting System allocator; CPU measurements -use jemalloc without the counting shim. Heap figures mean requested allocation -bytes, not allocator-resident pages or process RSS. The upstream exact footprint -formula is retained separately in `exact-baselines.json` for auditability. -Raw timing/error reports, disjoint phase samples, heap samples, serialization -sizes, filesystem allocation, binary/source identities and full commands are -preserved alongside this document. Recommendations are generated by the Rust -planner comparator, not by a separate Python optimization model. - -This slice supplies no KLL/DDSketch quantile evidence and no real o11y trace -distribution. Fixed-quantile readout requires separately matched measurements; -point-frequency evidence must not be relabeled as `count_over_time` or quantile -accuracy. The separate synthetic o11y operator evaluation covers its explicitly -supported exact-summary workload. diff --git a/tools/empirical-bench/results-sweep/comparison-evidence.json b/tools/empirical-bench/results-sweep/comparison-evidence.json deleted file mode 100644 index 172c487c..00000000 --- a/tools/empirical-bench/results-sweep/comparison-evidence.json +++ /dev/null @@ -1,2494 +0,0 @@ -{ - "schema_version": 1, - "timing_contract": "disjoint_live_state_v1", - "sketch_evidence": { - "schema_version": 1, - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "records": [ - { - "id": "cms-uniform-seed42-w272-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886308, - "valid_until_unix_seconds": 1791478308, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 505.475, - "stddev": 2.9324591056398384, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 39.18329, - "stddev": 1.2404534228458564, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1540.0, - "stddev": 49.21381919745713, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 41.56236, - "stddev": 1.2531359914231197, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 1669, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 1.6347221960194194, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w30000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886328, - "valid_until_unix_seconds": 1791478328, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5313752.5, - "stddev": 285040.9840468121, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 958.89495, - "stddev": 0.37400001336898875, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 900674.8, - "stddev": 6828.900035876935, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1381.6785599999998, - "stddev": 1.1267877186941877, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2490679, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 2498560, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w2720-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 2720, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886379, - "valid_until_unix_seconds": 1791478379, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 9061.88984375, - "stddev": 4977.459586428361, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 34.73418, - "stddev": 0.27307644442536533, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 2460.0, - "stddev": 107.4406813083387, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 36.6688, - "stddev": 0.01859623617832312, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 13781, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 16384, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.006335943223443224, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.104, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.104, - "accuracy_runs": 1, - "are_all": 0.006335943223443224, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.006335943223443223, - "l1_err": 104.0, - "l2_err": 40.049968789001575, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.006335943223443224, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w27200-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 27200, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886399, - "valid_until_unix_seconds": 1791478399, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 31745.793103448275, - "stddev": 915.6813529123244, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 46.32539, - "stddev": 0.22768290833964674, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 37594.2, - "stddev": 2734.4467813435317, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 50.47502, - "stddev": 0.05519897643978545, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 136183, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 143360, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w300-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 300, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886419, - "valid_until_unix_seconds": 1791478419, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 6091.32, - "stddev": 99.73249556626484, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 757.95226, - "stddev": 0.2581798365480518, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8584.4, - "stddev": 165.01908980478592, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 2104.83466, - "stddev": 1.6008204155995156, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 29755, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 32768, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.3932923866316825, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.446, - "aae_top1": 9.0, - "aae_top10": 8.2, - "aae_top100": 6.92, - "aae_top1000": 7.446, - "accuracy_runs": 1, - "are_all": 0.3932923866316825, - "are_top1": 0.2195121951219512, - "are_top10": 0.2434299417440008, - "are_top100": 0.2454991949546276, - "are_top1000": 0.3932923866316827, - "l1_err": 7446.0, - "l2_err": 312.3747749098829, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.3932923866316825, - "relative_error_p99": 1.3846153846153846 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w3000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 3000, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886440, - "valid_until_unix_seconds": 1791478440, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 51035.7375, - "stddev": 951.9281311091058, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 774.44066, - "stddev": 0.6066855995901015, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 68290.8, - "stddev": 247.88848299184858, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1519.04208, - "stddev": 7.1756951556626465, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 251754, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 258048, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w272-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886460, - "valid_until_unix_seconds": 1791478460, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 413.40859375, - "stddev": 2.7002030472877463, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.40953, - "stddev": 0.1888592286598663, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1104.6, - "stddev": 114.85773809369572, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 35.77964285714286, - "stddev": 0.26766073908351545, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 1722, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 2.3164860214890104, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w30000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886480, - "valid_until_unix_seconds": 1791478480, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 4991299.4, - "stddev": 127408.84023557784, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 862.07043, - "stddev": 67.54045694576882, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 906510.0, - "stddev": 10240.438638066242, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1383.6344117647059, - "stddev": 2.9386960922807495, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2495217, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 2502656, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w2720-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 2720, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886531, - "valid_until_unix_seconds": 1791478531, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 13362.875, - "stddev": 3039.657607879287, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.83039, - "stddev": 0.16780548039322382, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 2661.8, - "stddev": 223.53120587515292, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 37.005063025210085, - "stddev": 0.16744114940021262, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 13933, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 16384, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.007412989350329503, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.015756302521008403, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.05, - "accuracy_runs": 1, - "are_all": 0.007412989350329503, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0008494363929146537, - "l1_err": 15.0, - "l2_err": 6.557438524302, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.007412989350329503, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w27200-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 27200, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886551, - "valid_until_unix_seconds": 1791478551, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 29308.56551724138, - "stddev": 325.16572706768056, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 37.90535, - "stddev": 0.20893840898695612, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 33239.0, - "stddev": 1520.0851949808603, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 42.75764705882353, - "stddev": 0.029966574634030334, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 136338, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 143360, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w300-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 300, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886571, - "valid_until_unix_seconds": 1791478571, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5789.295, - "stddev": 50.43642858217649, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 756.83812, - "stddev": 0.15442492755380408, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8532.4, - "stddev": 65.54998093058457, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 2100.1955042016807, - "stddev": 4.949446360451842, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 29853, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 32768, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.6369033391351014, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 2.2815126050420167, - "aae_top1": 1.0, - "aae_top10": 0.8, - "aae_top100": 2.01, - "accuracy_runs": 1, - "are_all": 0.6369033391351014, - "are_top1": 0.0002805836139169473, - "are_top10": 0.001555601294898813, - "are_top100": 0.04553785988253641, - "l1_err": 2172.0, - "l2_err": 102.52804494381036, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.6369033391351014, - "relative_error_p99": 4.5 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w3000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 3000, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886592, - "valid_until_unix_seconds": 1791478592, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 51510.1875, - "stddev": 1338.8413243535902, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 763.80445, - "stddev": 1.0832422484144655, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 68282.4, - "stddev": 462.2210510134734, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1500.9115756302522, - "stddev": 13.696449994980448, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 254181, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 262144, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w512-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886649, - "valid_until_unix_seconds": 1791478649, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 653.75078125, - "stddev": 14.656944769230105, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.62379, - "stddev": 0.07565315095883289, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1184.0, - "stddev": 10.770329614269007, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 35.6547, - "stddev": 0.008609006911371453, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2759, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.4857875000848293, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 9.229, - "aae_top1": 0.0, - "aae_top10": 5.7, - "aae_top100": 9.32, - "aae_top1000": 9.229, - "accuracy_runs": 1, - "are_all": 0.4857875000848293, - "are_top1": 0.0, - "are_top10": 0.17943548387096775, - "are_top100": 0.3330711319229116, - "are_top1000": 0.485787500084829, - "l1_err": 9229.0, - "l2_err": 467.7210707248499, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.4857875000848293, - "relative_error_p99": 2.3684210526315788 - } - } - } - }, - { - "id": "cms-uniform-seed42-w4096-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 4096, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886669, - "valid_until_unix_seconds": 1791478669, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 4973.88, - "stddev": 300.623465532763, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 35.00645, - "stddev": 0.3773887451951894, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 5853.0, - "stddev": 1073.9336571688216, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 37.45286, - "stddev": 0.01899928946039723, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 20661, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 24576, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w32768-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 32768, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886689, - "valid_until_unix_seconds": 1791478689, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 35327.308333333334, - "stddev": 703.0214501528393, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 42.568979999999996, - "stddev": 0.47701038982395344, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 42699.4, - "stddev": 3601.5573437056364, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 46.04674, - "stddev": 0.23154995789245925, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 164023, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 172032, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w512-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886709, - "valid_until_unix_seconds": 1791478709, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 739.0640625, - "stddev": 3.194833256007488, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 40.60954, - "stddev": 0.08235665121895089, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1845.0, - "stddev": 327.10854467592253, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 43.60256302521008, - "stddev": 0.023270849185024416, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2913, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.49153700428012315, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 1.694327731092437, - "aae_top1": 2.0, - "aae_top10": 1.8, - "aae_top100": 1.46, - "accuracy_runs": 1, - "are_all": 0.49153700428012315, - "are_top1": 0.0005611672278338945, - "are_top10": 0.003950663328809479, - "are_top100": 0.03129160657746158, - "l1_err": 1613.0, - "l2_err": 107.81001808737442, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.49153700428012315, - "relative_error_p99": 5.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w4096-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 4096, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886729, - "valid_until_unix_seconds": 1791478729, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5492.366153846154, - "stddev": 110.32925778298996, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 46.86758, - "stddev": 0.2167893926141219, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8647.0, - "stddev": 13.30413469565007, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 51.65478991596639, - "stddev": 0.3125781503156082, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 20818, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 24576, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w32768-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 32768, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886750, - "valid_until_unix_seconds": 1791478750, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 37349.625, - "stddev": 337.66657026364135, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 48.96084, - "stddev": 0.2723536519857951, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 48184.4, - "stddev": 857.3592012686398, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 55.503865546218485, - "stddev": 0.030379887382542214, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 164178, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 172032, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - } - ] - }, - "query_bindings": [ - { - "record_id": "cms-uniform-seed42-w272-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-uniform-seed42-w30000-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-uniform-seed42-w2720-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-uniform-seed42-w27200-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-uniform-seed42-w300-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-uniform-seed42-w3000-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w272-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-zipf-seed42-w30000-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w2720-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w27200-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-zipf-seed42-w300-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "countsketch-zipf-seed42-w3000-d83", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-uniform-seed42-w512-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-uniform-seed42-w4096-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-uniform-seed42-w32768-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w512-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w4096-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - }, - { - "record_id": "cms-zipf-seed42-w32768-d5", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - } - } - ], - "exact_records": [ - { - "id": "exact-uniform-seed42-w272-d5", - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "measured_at_unix_seconds": 1788886308, - "valid_until_unix_seconds": 1791478308, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms --library polars --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "empty_build_cpu_ns": { - "value": 8.846435546875, - "stddev": 0.013714315753574624, - "samples": 5, - "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" - }, - "update_cpu_ns": { - "value": 2.31019, - "stddev": 0.07922044717116923, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "prepare_cpu_ns": { - "value": 640826.2, - "stddev": 7605.786856072158, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 16.237379999999998, - "stddev": 0.10556577096767712, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 296976, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - }, - "peak_bytes": { - "value": 628344, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - } - } - }, - { - "id": "exact-zipf-seed42-w272-d5", - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "measured_at_unix_seconds": 1788886460, - "valid_until_unix_seconds": 1791478460, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms --library polars --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "empty_build_cpu_ns": { - "value": 8.84130859375, - "stddev": 0.014463142841002207, - "samples": 5, - "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" - }, - "update_cpu_ns": { - "value": 2.16378, - "stddev": 0.02405147084899392, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "prepare_cpu_ns": { - "value": 484917.8, - "stddev": 9739.177208573628, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 16.352710084033614, - "stddev": 0.1020372063260519, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 296976, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - }, - "peak_bytes": { - "value": 626584, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - } - } - } - ] -} diff --git a/tools/empirical-bench/results-sweep/context-uniform.json b/tools/empirical-bench/results-sweep/context-uniform.json deleted file mode 100644 index a6c0b3c2..00000000 --- a/tools/empirical-bench/results-sweep/context-uniform.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 -} diff --git a/tools/empirical-bench/results-sweep/context-zipf.json b/tools/empirical-bench/results-sweep/context-zipf.json deleted file mode 100644 index d04daa2e..00000000 --- a/tools/empirical-bench/results-sweep/context-zipf.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 -} diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json deleted file mode 100644 index 73cfdf89..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-are001.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Extension {\n ext_kind: \"frequency\",\n payload: Object {\n \"accuracy\": Object {\n \"Epsilon\": Number(0.01),\n },\n \"item_label\": String(\"key\"),\n \"item_value\": String(\"42\"),\n },\n },\n ],\n output_names: [],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n ),\n)", - "formal_epsilon": 0.01, - "item": 42, - "limitations": [ - "The caller asserts the fixed-snapshot integer-key benchmark context", - "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", - "No materializations deployed or data-plane execution performed" - ], - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 742555.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 932753.6483333334, - "disk_bytes_per_state": 172032.0, - "objective_cost": 932753.6483333334, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164023.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "root_raw_fallback": true, - "scope": "typed offline point-frequency recommendation and control-plane binding", - "unavailable_reason": null -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json deleted file mode 100644 index ae474e20..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-frequency-uniform-memory-weighted.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: SummaryEstimate {\n summary_input: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n },\n query: PointCount {\n key: Named(\n \"key\",\n ),\n value: Some(\n \"42\",\n ),\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: Frequency,\n bound: Constant {\n value: 0.0006636430245261341,\n },\n failure_probability: Constant {\n value: 0.006737946999085467,\n },\n provenance: [\n SketchReadout {\n algorithm: \"Cms\",\n contract: \"count_min_l1_markov_v1\",\n params: Object {\n \"Cms\": Object {\n \"depth\": Number(5),\n \"width\": Number(4096),\n },\n },\n query: \"PointCount { key: Named(\\\"key\\\"), value: Some(\\\"42\\\") }\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ApproximateAggregate,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n ),\n)", - "formal_epsilon": 0.01, - "item": 42, - "limitations": [ - "The caller asserts the fixed-snapshot integer-key benchmark context", - "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", - "No materializations deployed or data-plane execution performed" - ], - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 988315.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 932753.6483333334, - "disk_bytes_per_state": 172032.0, - "objective_cost": 2898833.6483333334, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164023.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": -39279.51356445311, - "estimated_retained_bytes_savings": 215056.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 1594204.2264355468, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 988315.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - } - ], - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "root_raw_fallback": false, - "scope": "typed offline point-frequency recommendation and control-plane binding", - "unavailable_reason": null -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json deleted file mode 100644 index ab6cca7b..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-are001.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Extension {\n ext_kind: \"frequency\",\n payload: Object {\n \"accuracy\": Object {\n \"Epsilon\": Number(0.01),\n },\n \"item_label\": String(\"key\"),\n \"item_value\": String(\"42\"),\n },\n },\n ],\n output_names: [],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n ),\n)", - "formal_epsilon": 0.01, - "item": 42, - "limitations": [ - "The caller asserts the fixed-snapshot integer-key benchmark context", - "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", - "No materializations deployed or data-plane execution performed" - ], - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 994498.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 1072070.2905462184, - "disk_bytes_per_state": 172032.0, - "objective_cost": 1072070.2905462184, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164178.0 - } - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "root_raw_fallback": true, - "scope": "typed offline point-frequency recommendation and control-plane binding", - "unavailable_reason": null -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json deleted file mode 100644 index e3da71f4..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-frequency-zipf-memory-weighted.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "bound_plan": "Committed(\n Summary(\n SummaryNode {\n expr: SummaryEstimate {\n summary_input: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"offline_integer_snapshot\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"key\",\n dtype: Int64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Sketch(\n SketchKind {\n category: Frequency,\n algorithm: Cms,\n params: Cms {\n width: 4096,\n depth: 5,\n },\n },\n PerSubpopulationInstance,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n },\n query: PointCount {\n key: Named(\n \"key\",\n ),\n value: Some(\n \"42\",\n ),\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"key\",\n dtype: Plain(\n Int64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: Frequency,\n bound: Constant {\n value: 0.0006636430245261341,\n },\n failure_probability: Constant {\n value: 0.006737946999085467,\n },\n provenance: [\n SketchReadout {\n algorithm: \"Cms\",\n contract: \"count_min_l1_markov_v1\",\n params: Object {\n \"Cms\": Object {\n \"depth\": Number(5),\n \"width\": Number(4096),\n },\n },\n query: \"PointCount { key: Named(\\\"key\\\"), value: Some(\\\"42\\\") }\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ApproximateAggregate,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n ),\n)", - "formal_epsilon": 0.01, - "item": 42, - "limitations": [ - "The caller asserts the fixed-snapshot integer-key benchmark context", - "Observed mean error applies to the recorded offline probe population, not an individual key guarantee", - "No materializations deployed or data-plane execution performed" - ], - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 1240258.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 1072070.2905462184, - "disk_bytes_per_state": 172032.0, - "objective_cost": 3038150.2905462184, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164178.0 - } - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": -449943.804677185, - "estimated_retained_bytes_savings": 215056.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 1435482.9513926273, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 1240258.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - } - ], - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "root_raw_fallback": false, - "scope": "typed offline point-frequency recommendation and control-plane binding", - "unavailable_reason": null -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/control-plane-uniform.json b/tools/empirical-bench/results-sweep/control-plane-uniform.json deleted file mode 100644 index c3e7f1cc..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-uniform.json +++ /dev/null @@ -1,1536 +0,0 @@ -{ - "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "estimated_end_to_end_savings": null, - "evaluation": "offline control-plane parser and typed summary binder", - "limitations": [ - "No deployed execution or measured end-to-end speedup", - "Binding does not establish executable placement or complete physical cost", - "Offline point-frequency errors do not establish current query guarantees", - "raw_subtrees includes necessary source scans beneath summaries" - ], - "offline_context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "rows": [ - { - "mode": "exact", - "planning_elapsed_ns": 23488917, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 5626616, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 5119687, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 13654076, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9961464, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3927451, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3608500, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3603072, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3603403, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7601402, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3654507, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 2956095, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7706557, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 16987813, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7710442, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7690766, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 15061807, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9330438, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9552102, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3522606, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3734993, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3685464, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 4273156, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10126022, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10721623, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3656938, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3505275, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10716402, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3814882, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3810214, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 11117536, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9225309, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3891739, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3616177, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3585811, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3594239, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7610806, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3650866, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3071899, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7689742, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 16988686, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7720601, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7672916, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 15070153, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9235865, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9594067, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3522046, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3734095, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3683268, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 4279327, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10072650, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10729961, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3653979, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3494081, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10864653, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3816141, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3810222, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 11266686, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9221447, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3892051, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3609406, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3604180, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3600843, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7607819, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3654440, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3067066, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7686698, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 16988097, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7690207, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7687079, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 15069883, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9199423, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9542765, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3525941, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3734957, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3683890, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 4272091, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10105015, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10922153, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3662076, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3503888, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - } - ], - "schema_version": 1, - "reproduction": { - "command": [ - "cargo", - "run", - "--quiet", - "-p", - "control_plane", - "--example", - "offline_planner_replay", - "--", - "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/planner-evidence.json", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/context-uniform.json" - ], - "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", - "planner_revision": "dfdf6b5c1f7d667394a4ea1f56fb3786af04228d", - "backend_dirty": true, - "planner_dirty": false, - "planner_source": "pinned_git_dependency" - } -} diff --git a/tools/empirical-bench/results-sweep/control-plane-zipf.json b/tools/empirical-bench/results-sweep/control-plane-zipf.json deleted file mode 100644 index 231e555c..00000000 --- a/tools/empirical-bench/results-sweep/control-plane-zipf.json +++ /dev/null @@ -1,1536 +0,0 @@ -{ - "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "estimated_end_to_end_savings": null, - "evaluation": "offline control-plane parser and typed summary binder", - "limitations": [ - "No deployed execution or measured end-to-end speedup", - "Binding does not establish executable placement or complete physical cost", - "Offline point-frequency errors do not establish current query guarantees", - "raw_subtrees includes necessary source scans beneath summaries" - ], - "offline_context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "rows": [ - { - "mode": "exact", - "planning_elapsed_ns": 12832552, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3866233, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3804280, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 11307005, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9744835, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3918827, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3601556, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3592663, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3596104, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7589547, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3648815, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3483616, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7672914, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 16963534, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7706072, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7660732, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 15059179, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9644568, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9559658, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3518503, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3730665, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3688405, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 4268132, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10516766, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10719205, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3650911, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3498275, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10811485, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3813822, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3806139, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 11112933, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9577242, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3887106, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3609492, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3598309, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3594972, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7606504, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3650504, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3481678, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7681928, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 17017942, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7752312, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7671696, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 15081671, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9669562, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9577064, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3516380, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3731446, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3683710, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 4277400, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10561375, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10938389, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3648653, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3496754, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10928917, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3811033, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3804938, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 11250554, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9552127, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3885379, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3604017, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3591444, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3597560, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7604627, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3649075, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3483081, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7669062, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Sort {\n keys: [\n SortKey {\n expr: Column(\n 1,\n ),\n ascending: false,\n nulls_first: false,\n },\n ],\n partition_by: GroupKeys {\n keys: [],\n without: false,\n },\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 16976947, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n BinaryOp {\n op: Compare(\n Gt,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: PromqlScalarBridge(\n Literal(\n Float64(\n 0.0,\n ),\n ),\n ),\n vector_match: None,\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: None,\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7722286, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7672621, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 15050049, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9654149, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9543023, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3519336, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3729783, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3680998, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 4277677, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10541307, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10730686, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3654212, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3499937, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - } - ], - "schema_version": 1, - "reproduction": { - "command": [ - "cargo", - "run", - "--quiet", - "-p", - "control_plane", - "--example", - "offline_planner_replay", - "--", - "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/planner-evidence.json", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results-sweep/context-zipf.json" - ], - "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", - "planner_revision": "dfdf6b5c1f7d667394a4ea1f56fb3786af04228d", - "backend_dirty": true, - "planner_dirty": false, - "planner_source": "pinned_git_dependency" - } -} diff --git a/tools/empirical-bench/results-sweep/exact-baselines.json b/tools/empirical-bench/results-sweep/exact-baselines.json deleted file mode 100644 index 7b0fbdaa..00000000 --- a/tools/empirical-bench/results-sweep/exact-baselines.json +++ /dev/null @@ -1,151 +0,0 @@ -[ - { - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "implementation": "polars exact group_by + HashMap", - "insert_cpu_ns_per_item": { - "value": 2.31019, - "stddev": 0.07922044717116923, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "prepare_cpu_ns_per_dataset": { - "value": 640826.2, - "stddev": 7605.786856072158, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns_per_key": { - "value": 16.237379999999998, - "stddev": 0.10556577096767712, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": 290816, - "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "empty_build_cpu_ns": { - "value": 8.846435546875, - "stddev": 0.013714315753574624, - "samples": 5, - "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" - }, - "retained_heap_bytes": { - "value": 296976, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - }, - "peak_heap_bytes": { - "value": 628344, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - } - }, - { - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "implementation": "polars exact group_by + HashMap", - "insert_cpu_ns_per_item": { - "value": 2.16378, - "stddev": 0.02405147084899392, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "prepare_cpu_ns_per_dataset": { - "value": 484917.8, - "stddev": 9739.177208573628, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns_per_key": { - "value": 16.352710084033614, - "stddev": 0.1020372063260519, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": 290816, - "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "empty_build_cpu_ns": { - "value": 8.84130859375, - "stddev": 0.014463142841002207, - "samples": 5, - "method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded" - }, - "retained_heap_bytes": { - "value": 296976, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - }, - "peak_heap_bytes": { - "value": 626584, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages" - } - } -] diff --git a/tools/empirical-bench/results-sweep/manifest.json b/tools/empirical-bench/results-sweep/manifest.json deleted file mode 100644 index 7c46111e..00000000 --- a/tools/empirical-bench/results-sweep/manifest.json +++ /dev/null @@ -1,1598 +0,0 @@ -{ - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "source_dirty": false, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2" - }, - "binary_sha256": "1c2aebd6649ecf9dd2a77dbc6c6c4bd89d07c061f387389e12698dfe41dbc6d4", - "runtime_provenance": { - "runtime_field_status": "declared build preconditions, not introspected from the executable", - "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", - "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", - "declared_settings": "release; repository target-cpu=native; default jemalloc", - "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", - "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings" - }, - "invocations": [ - { - "id": "cms-uniform-seed42-w272-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "countsketch-uniform-seed42-w30000-d83", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "exact-uniform-seed42-w272-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Exact", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "prepare", - "--metrics", - "latency,cpu,memory" - ] - }, - { - "id": "cms-uniform-seed42-w2720-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=2720", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=2720", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "cms-uniform-seed42-w27200-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=27200", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=27200", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "countsketch-uniform-seed42-w300-d83", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=300", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=300", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "countsketch-uniform-seed42-w3000-d83", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=3000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=3000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "cms-zipf-seed42-w272-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "countsketch-zipf-seed42-w30000-d83", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "exact-zipf-seed42-w272-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Exact", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "prepare", - "--metrics", - "latency,cpu,memory", - "--zipf-s", - "1.1" - ] - }, - { - "id": "cms-zipf-seed42-w2720-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=2720", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=2720", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "cms-zipf-seed42-w27200-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=27200", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=27200", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "countsketch-zipf-seed42-w300-d83", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=300", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=300", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "countsketch-zipf-seed42-w3000-d83", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=3000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=3000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "cms-uniform-seed42-w512-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=512", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=512", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "cms-uniform-seed42-w4096-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=4096", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=4096", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "cms-uniform-seed42-w32768-d5", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=32768", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=32768", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": null - }, - { - "id": "cms-zipf-seed42-w512-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=512", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=512", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "cms-zipf-seed42-w4096-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=4096", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=4096", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "cms-zipf-seed42-w32768-d5", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=32768", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=32768", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - } - ], - "memory_probe": { - "source_sha256": "e00d06d0fa8cba91a2002ab6907abc299f958f15b604af25fedbff40f1f5ffcd", - "compile_argv": [ - "rustc", - "--edition=2021", - "-C", - "opt-level=3", - "-C", - "panic=abort", - "-C", - "target-cpu=native", - "-L", - "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/memory_probe.rs", - "-o", - "/tmp/asap-memory-probe-n9uar0jf/memory-probe", - "--extern", - "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", - "--extern", - "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", - "--extern", - "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib", - "--extern", - "sketch_bench=/mydata/sketch-bench-empirical-322/target/release/deps/libsketch_bench-a5253016ef6c3464.rlib", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/parking_lot_core-c5a5e0d71b53c3f9/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-schema-0a856eee7186aef8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-core-0dd86b8db3572fa4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/getrandom-50d1f8431ac559e7/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/thiserror-1af01011b7c1080b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-compute-206799857e5f2242/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/object-4bc422477f333c3b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/num-traits-12456a3612313957/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-utils-089d0beadf99033c/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-2ea15a1ac3ee4c0d/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/psm-219a73c4a64cba21/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-arrow-e4ca671fd2bb5451/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-b2ef154e74e26c09/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-lazy-d1ffe2cd6989855b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-ops-98e6fab6568754e8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zmij-2d2f27c0673cdf2a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/proc-macro2-cea40e985b7590c0/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-21aee85e18bd062a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-safe-f63c98332f917517/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_json-e116251e9e55490e/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/crossbeam-utils-18696716158d2402/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/stacker-b2d7e69958718f3f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/crc32fast-ebefb9f7c0915fb4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/quote-95ad9003c7cac562/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zerocopy-7931ceb31f5dc13c/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/paste-ad7af34da7803563/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libm-b1ff914daded363a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/ahash-631aa817ee56071f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/lz4-sys-99def065bc264315/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rustix-2e359f4caddb674f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde-7b6b458485157d73/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-48289a87b282dc48/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rayon-core-b1557f267348d6c4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-plan-49fb2c4cd5ea3f48/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rustversion-2053b8c49ec6187a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/chrono-tz-19fe2621cdb8a5f8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-52f449270a8194c9/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_core-d525236e05349557/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-sys-8b42f68034627dbe/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out/lib" - ], - "allocator": "System + requested-byte tracking; separate from uninstrumented jemalloc CPU measurements" - }, - "resource_probe": { - "source_sha256": "a9cd9fd257022620fd718e0f34487ba6001469f0f2fba6170ab73ec731e05336", - "compile_argv": [ - "rustc", - "--edition=2021", - "-C", - "opt-level=3", - "-C", - "panic=abort", - "-C", - "target-cpu=native", - "-L", - "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/resource_probe.rs", - "-o", - "/tmp/asap-resource-probe-4xcwpp9f/resource-probe", - "--extern", - "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", - "--extern", - "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", - "--extern", - "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib", - "--extern", - "tikv_jemallocator=/mydata/sketch-bench-empirical-322/target/release/deps/libtikv_jemallocator-f788f1bc48fa8f69.rlib", - "--extern", - "sketch_bench=/mydata/sketch-bench-empirical-322/target/release/deps/libsketch_bench-a5253016ef6c3464.rlib", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out/lib", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/parking_lot_core-c5a5e0d71b53c3f9/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-schema-0a856eee7186aef8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-core-0dd86b8db3572fa4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/getrandom-50d1f8431ac559e7/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/thiserror-1af01011b7c1080b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-compute-206799857e5f2242/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/object-4bc422477f333c3b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/num-traits-12456a3612313957/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-utils-089d0beadf99033c/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-2ea15a1ac3ee4c0d/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/psm-219a73c4a64cba21/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/tikv-jemalloc-sys-76226ecec1ea73d0/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-arrow-e4ca671fd2bb5451/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-b2ef154e74e26c09/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-lazy-d1ffe2cd6989855b/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-ops-98e6fab6568754e8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zmij-2d2f27c0673cdf2a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/proc-macro2-cea40e985b7590c0/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-21aee85e18bd062a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-safe-f63c98332f917517/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_json-e116251e9e55490e/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/crossbeam-utils-18696716158d2402/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/stacker-b2d7e69958718f3f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/crc32fast-ebefb9f7c0915fb4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/quote-95ad9003c7cac562/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zerocopy-7931ceb31f5dc13c/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/paste-ad7af34da7803563/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libm-b1ff914daded363a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/ahash-631aa817ee56071f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/lz4-sys-99def065bc264315/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rustix-2e359f4caddb674f/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde-7b6b458485157d73/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/anyhow-48289a87b282dc48/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rayon-core-b1557f267348d6c4/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/polars-plan-49fb2c4cd5ea3f48/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/rustversion-2053b8c49ec6187a/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/chrono-tz-19fe2621cdb8a5f8/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/libc-52f449270a8194c9/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/serde_core-d525236e05349557/out", - "-L", - "native=/mydata/sketch-bench-empirical-322/target/release/build/zstd-sys-8b42f68034627dbe/out" - ], - "allocator": "jemalloc", - "disk_filesystem_path": "/tmp" - } -} diff --git a/tools/empirical-bench/results-sweep/memory-probe.json b/tools/empirical-bench/results-sweep/memory-probe.json deleted file mode 100644 index 183b3422..00000000 --- a/tools/empirical-bench/results-sweep/memory-probe.json +++ /dev/null @@ -1,1156 +0,0 @@ -[ - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "cleanup_deltas": [ - 0, - 0, - 0, - 0, - 0 - ], - "impl": "polars", - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages", - "samples": [ - [ - 296976, - 628344 - ], - [ - 296976, - 628344 - ], - [ - 296976, - 628344 - ], - [ - 296976, - 628344 - ], - [ - 296976, - 628344 - ] - ], - "sketch": "cms", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "cleanup_deltas": [ - 0, - 0, - 0, - 0, - 0 - ], - "impl": "polars", - "method": "requested allocation bytes using counting System allocator; exact upstream PolarsFrequencyCore construction + insertion + prepare; state alive; input and two startup warmups excluded; valid only when cleanup deltas are zero; not allocator-resident pages", - "samples": [ - [ - 296976, - 626584 - ], - [ - 296976, - 626584 - ], - [ - 296976, - 626584 - ], - [ - 296976, - 626584 - ], - [ - 296976, - 626584 - ] - ], - "sketch": "cms", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ], - [ - 54400, - 54400 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ], - [ - 544000, - 544000 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ], - [ - 99600, - 99600 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ], - [ - 996000, - 996000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ], - [ - 10240, - 10240 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ], - [ - 81920, - 81920 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "impl": "lib", - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ], - [ - 655360, - 655360 - ] - ], - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - } -] diff --git a/tools/empirical-bench/results-sweep/operation-reports.json b/tools/empirical-bench/results-sweep/operation-reports.json deleted file mode 100644 index dc646821..00000000 --- a/tools/empirical-bench/results-sweep/operation-reports.json +++ /dev/null @@ -1,7444 +0,0 @@ -[ - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 28590919.77709379, - "stddev": 1609158.8508598115, - "n": 5, - "samples": [ - 31412115.96724973, - 27333606.66940003, - 28108718.902972918, - 28045141.459693525, - 28055015.886152744 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7024, - "stddev": 0.03748066168039188, - "n": 5, - "samples": [ - 0.637, - 0.733, - 0.713, - 0.715, - 0.714 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.00044721359549995795, - "n": 5, - "samples": [ - 0.0, - 0.001, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7011882, - "stddev": 0.03700154713927518, - "n": 5, - "samples": [ - 0.636697, - 0.7317, - 0.711523, - 0.713136, - 0.712885 - ] - }, - "rss_peak_kb": 11296, - "heap_allocated_kb": 1051, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:51:48.103893862Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 24473073.58858718, - "stddev": 169053.16090350362, - "n": 5, - "samples": [ - 24592381.28027937, - 24225979.94088861, - 24376569.241644934, - 24537468.714727387, - 24632968.765395604 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.042800000000000005, - "stddev": 0.0017888543819998294, - "n": 5, - "samples": [ - 0.042, - 0.042, - 0.042, - 0.042, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0408628, - "stddev": 0.0002832820149603565, - "n": 5, - "samples": [ - 0.040663, - 0.041278, - 0.041023, - 0.040754, - 0.040596 - ] - }, - "rss_peak_kb": 11296, - "heap_allocated_kb": 733, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:51:48.103896498Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0034000000000000002, - "stddev": 0.0008944271909999159, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0022308, - "stddev": 0.0009705532958060571, - "n": 5, - "samples": [ - 0.003907, - 0.002138, - 0.001958, - 0.001485, - 0.001666 - ] - }, - "rss_peak_kb": 11296, - "heap_allocated_kb": 637, - "memory_bytes": 5440, - "merge_folds_per_sec": { - "mean": 501608.7408443724, - "stddev": 158760.43356765856, - "n": 5, - "samples": [ - 255950.8574353724, - 467726.8475210477, - 510725.2298263534, - 673400.6734006734, - 600240.0960384153 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:51:48.103904851Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.036862, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.036862 - ] - }, - "memory_bytes": 5440, - "accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.0794538568545333, - "are_top1000": 1.6347221960194203, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:51:58.116123539Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 921478.5810593877, - "stddev": 7690.019883726106, - "n": 5, - "samples": [ - 929058.0559088557, - 913257.1049804568, - 928536.7908329278, - 913737.1378362878, - 922803.8157384098 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 20.1178, - "stddev": 2.2658516500424297, - "n": 5, - "samples": [ - 17.571, - 21.876, - 21.541, - 21.89, - 17.711 - ] - }, - "sys_ms": { - "mean": 1.5894, - "stddev": 2.164989792123741, - "n": 5, - "samples": [ - 3.958, - 0.025, - 0.0, - 0.0, - 3.964 - ] - } - }, - "wall_time_ms": { - "mean": 21.705458999999998, - "stddev": 0.1813336608258377, - "n": 5, - "samples": [ - 21.52718, - 21.899638, - 21.539265, - 21.888133, - 21.673079 - ] - }, - "rss_peak_kb": 282556, - "heap_allocated_kb": 243573, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:08.791194355Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 268207.4355130188, - "stddev": 12903.457164889896, - "n": 5, - "samples": [ - 281195.15815681074, - 256320.15001905742, - 278226.9597472364, - 252803.9113821169, - 272490.9982598725 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 3.6565999999999996, - "stddev": 0.3205811909641613, - "n": 5, - "samples": [ - 3.151, - 3.904, - 3.596, - 3.957, - 3.675 - ] - }, - "sys_ms": { - "mean": 0.0814, - "stddev": 0.18201593336848287, - "n": 5, - "samples": [ - 0.407, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 3.7354578000000003, - "stddev": 0.18192240655207922, - "n": 5, - "samples": [ - 3.556249, - 3.901371, - 3.594188, - 3.955635, - 3.669846 - ] - }, - "rss_peak_kb": 282556, - "heap_allocated_kb": 175245, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:08.791198645Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 1.596, - "stddev": 1.5730268592748184, - "n": 5, - "samples": [ - 0.0, - 0.0, - 1.694, - 3.083, - 3.203 - ] - }, - "sys_ms": { - "mean": 1.5617999999999999, - "stddev": 1.5978310924500123, - "n": 5, - "samples": [ - 3.274, - 3.106, - 1.429, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 3.1563134, - "stddev": 0.07895276971899076, - "n": 5, - "samples": [ - 3.272052, - 3.104857, - 3.121441, - 3.081432, - 3.201785 - ] - }, - "rss_peak_kb": 282556, - "heap_allocated_kb": 77909, - "memory_bytes": 9960000, - "merge_folds_per_sec": { - "mean": 316.98194388143827, - "stddev": 7.827645548918142, - "n": 5, - "samples": [ - 305.61861486308896, - 322.0760247573399, - 320.3648571284865, - 324.5244418828649, - 312.3257807754112 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:08.791206619Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 8.759675, - "stddev": 0.0, - "n": 1, - "samples": [ - 8.759675 - ] - }, - "memory_bytes": 9960000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:18.902251139Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 571845728.2743416, - "stddev": 78709030.93591695, - "n": 5, - "samples": [ - 671817265.7037286, - 451803826.7784128, - 568084985.5138328, - 590005310.0477904, - 577517253.3279432 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0366, - "stddev": 0.0051283525619832335, - "n": 5, - "samples": [ - 0.031, - 0.045, - 0.036, - 0.035, - 0.036 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0355544, - "stddev": 0.005317104315320511, - "n": 5, - "samples": [ - 0.02977, - 0.044267, - 0.035206, - 0.033898, - 0.034631 - ] - }, - "rss_peak_kb": 19476, - "heap_allocated_kb": 3185, - "memory_bytes": 262144 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:28.929676697Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 19775757.807094183, - "stddev": 838476.1546876673, - "n": 5, - "samples": [ - 19481784.531463083, - 20583331.618055698, - 18481555.407703113, - 20382788.773159944, - 19949328.705089074 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0526, - "stddev": 0.0023021728866442675, - "n": 5, - "samples": [ - 0.053, - 0.05, - 0.056, - 0.051, - 0.053 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0506418, - "stddev": 0.0022074174276742508, - "n": 5, - "samples": [ - 0.05133, - 0.048583, - 0.054108, - 0.049061, - 0.050127 - ] - }, - "rss_peak_kb": 19492, - "heap_allocated_kb": 2053, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:28.929684580Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.048841, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.048841 - ] - }, - "memory_bytes": 290816, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:38.943261347Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "latency", - "operation": "prepare", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.862, - "stddev": 0.01598436736314578, - "n": 5, - "samples": [ - 0.842, - 0.863, - 0.872, - 0.851, - 0.882 - ] - } - }, - "wall_time_ms": { - "mean": 0.8168664, - "stddev": 0.009893839158789667, - "n": 5, - "samples": [ - 0.802512, - 0.822305, - 0.821603, - 0.811058, - 0.826854 - ] - }, - "rss_peak_kb": 18288, - "heap_allocated_kb": 1834, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:48.962964572Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 24990558.513269562, - "stddev": 1579868.8793788734, - "n": 5, - "samples": [ - 27797854.005670764, - 24403338.376689933, - 24401790.115322858, - 23973686.48171767, - 24376123.586946588 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.8038, - "stddev": 0.04668725736215394, - "n": 5, - "samples": [ - 0.721, - 0.82, - 0.821, - 0.835, - 0.822 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.8026749999999999, - "stddev": 0.04692298889670179, - "n": 5, - "samples": [ - 0.71948, - 0.81956, - 0.819612, - 0.834248, - 0.820475 - ] - }, - "rss_peak_kb": 12856, - "heap_allocated_kb": 2209, - "memory_bytes": 54400 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:59.017545868Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 8857763.573752059, - "stddev": 411812.6739818057, - "n": 5, - "samples": [ - 9182061.923825614, - 8637368.711995577, - 8233773.2912861975, - 9116019.58121006, - 9119594.360442847 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.1148, - "stddev": 0.005310367218940701, - "n": 5, - "samples": [ - 0.11, - 0.117, - 0.123, - 0.111, - 0.113 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.11309720000000001, - "stddev": 0.005429740481827841, - "n": 5, - "samples": [ - 0.108908, - 0.115776, - 0.121451, - 0.109697, - 0.109654 - ] - }, - "rss_peak_kb": 12928, - "heap_allocated_kb": 1561, - "memory_bytes": 54400 - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:59.017555048Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.1502, - "stddev": 0.009311283477587834, - "n": 5, - "samples": [ - 0.149, - 0.165, - 0.141, - 0.152, - 0.144 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1492638, - "stddev": 0.009404371201733798, - "n": 5, - "samples": [ - 0.148569, - 0.164301, - 0.140107, - 0.150536, - 0.142806 - ] - }, - "rss_peak_kb": 13056, - "heap_allocated_kb": 965, - "memory_bytes": 54400, - "merge_folds_per_sec": { - "mean": 6720.021553902316, - "stddev": 406.67993788410524, - "n": 5, - "samples": [ - 6730.879254757048, - 6086.390222822746, - 7137.4021283733155, - 6642.929266089175, - 7002.506897469295 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:52:59.017563648Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.045087, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.045087 - ] - }, - "memory_bytes": 54400, - "accuracy": { - "aae_all": 0.104, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.104, - "accuracy_runs": 1, - "are_all": 0.006335943223443224, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.006335943223443223, - "l1_err": 104.0, - "l2_err": 40.049968789001575, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.006335943223443224, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:09.029761284Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 22728722.29657367, - "stddev": 1071124.792702381, - "n": 5, - "samples": [ - 24596766.755010054, - 22410018.17452474, - 22438177.212235987, - 22345669.632681884, - 21852979.70841569 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.3072, - "stddev": 0.4219066247405935, - "n": 5, - "samples": [ - 0.814, - 0.0, - 0.0, - 0.0, - 0.722 - ] - }, - "sys_ms": { - "mean": 0.5758000000000001, - "stddev": 0.44203698940247077, - "n": 5, - "samples": [ - 0.0, - 0.895, - 0.893, - 0.896, - 0.195 - ] - } - }, - "wall_time_ms": { - "mean": 0.8814292, - "stddev": 0.039409757049492185, - "n": 5, - "samples": [ - 0.813115, - 0.892458, - 0.891338, - 0.895028, - 0.915207 - ] - }, - "rss_peak_kb": 26264, - "heap_allocated_kb": 14082, - "memory_bytes": 544000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:19.095980355Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6364974.272871866, - "stddev": 52458.99915142277, - "n": 5, - "samples": [ - 6286421.9572146125, - 6373323.815836435, - 6416631.909910488, - 6405288.205942826, - 6343205.475454967 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.1588, - "stddev": 0.0021679483388678815, - "n": 5, - "samples": [ - 0.16, - 0.158, - 0.157, - 0.157, - 0.162 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.00044721359549995795, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.001, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.15711840000000002, - "stddev": 0.001300415241374835, - "n": 5, - "samples": [ - 0.159073, - 0.156904, - 0.155845, - 0.156121, - 0.157649 - ] - }, - "rss_peak_kb": 26640, - "heap_allocated_kb": 10102, - "memory_bytes": 544000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:19.095984881Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0954, - "stddev": 0.0011401754250991403, - "n": 5, - "samples": [ - 0.096, - 0.095, - 0.095, - 0.094, - 0.097 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.00044721359549995795, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.001 - ] - } - }, - "wall_time_ms": { - "mean": 0.094034, - "stddev": 0.0007807483589480032, - "n": 5, - "samples": [ - 0.094306, - 0.093642, - 0.093826, - 0.09317, - 0.095226 - ] - }, - "rss_peak_kb": 26640, - "heap_allocated_kb": 4746, - "memory_bytes": 544000, - "merge_folds_per_sec": { - "mean": 10635.035367831519, - "stddev": 87.92375862897931, - "n": 5, - "samples": [ - 10603.779186902211, - 10678.96883876893, - 10658.026559802187, - 10733.068584308254, - 10501.33366937601 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:19.095992785Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.118774, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.118774 - ] - }, - "memory_bytes": 544000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:29.111049162Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 1311310.924690102, - "stddev": 5087.0670143445095, - "n": 5, - "samples": [ - 1319582.5790819242, - 1311256.8383683192, - 1305805.729797194, - 1309211.718387512, - 1310697.7578155596 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 15.2536, - "stddev": 0.05943315572977692, - "n": 5, - "samples": [ - 15.157, - 15.254, - 15.318, - 15.278, - 15.261 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 15.252096, - "stddev": 0.059000250152012115, - "n": 5, - "samples": [ - 15.156308, - 15.252542, - 15.316214, - 15.276368, - 15.259048 - ] - }, - "rss_peak_kb": 14340, - "heap_allocated_kb": 2912, - "memory_bytes": 99600 - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:39.490777022Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 444296.29919579526, - "stddev": 11054.849402443224, - "n": 5, - "samples": [ - 463929.0522578963, - 441097.78652719746, - 437434.02948042896, - 439148.8943109139, - 439871.7334025398 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 2.2533999999999996, - "stddev": 0.05490719442841725, - "n": 5, - "samples": [ - 2.156, - 2.268, - 2.288, - 2.278, - 2.277 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 2.2518308, - "stddev": 0.05428632633269639, - "n": 5, - "samples": [ - 2.155502, - 2.267071, - 2.286059, - 2.277132, - 2.27339 - ] - }, - "rss_peak_kb": 14348, - "heap_allocated_kb": 1953, - "memory_bytes": 99600 - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:39.490792364Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.2572, - "stddev": 0.0024899799195977554, - "n": 5, - "samples": [ - 0.259, - 0.259, - 0.257, - 0.253, - 0.258 - ] - } - }, - "wall_time_ms": { - "mean": 0.25593879999999997, - "stddev": 0.0029676058869061417, - "n": 5, - "samples": [ - 0.258245, - 0.25783, - 0.255616, - 0.250942, - 0.257061 - ] - }, - "rss_peak_kb": 14412, - "heap_allocated_kb": 912, - "memory_bytes": 99600, - "merge_folds_per_sec": { - "mean": 3907.6092853175387, - "stddev": 45.84247420699244, - "n": 5, - "samples": [ - 3872.2918159112473, - 3878.5246092386456, - 3912.118177265899, - 3984.984578109683, - 3890.1272460622185 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:39.490802709Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 2.075238, - "stddev": 0.0, - "n": 1, - "samples": [ - 2.075238 - ] - }, - "memory_bytes": 99600, - "accuracy": { - "aae_all": 7.446, - "aae_top1": 9.0, - "aae_top10": 8.2, - "aae_top100": 6.92, - "aae_top1000": 7.446, - "accuracy_runs": 1, - "are_all": 0.3932923866316825, - "are_top1": 0.21951219512195122, - "are_top10": 0.24342994174400082, - "are_top100": 0.2454991949546276, - "are_top1000": 0.3932923866316827, - "l1_err": 7446.0, - "l2_err": 312.3747749098829, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.3932923866316825, - "relative_error_p99": 1.3846153846153846 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:53:49.554573010Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 1223691.645571603, - "stddev": 1932.8434335010577, - "n": 5, - "samples": [ - 1224378.8022318466, - 1223986.9121527455, - 1220302.8620861296, - 1224944.9754717017, - 1224844.6759155912 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 16.3452, - "stddev": 0.025635912310663266, - "n": 5, - "samples": [ - 16.336, - 16.342, - 16.39, - 16.328, - 16.33 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 16.3440194, - "stddev": 0.025865292493997084, - "n": 5, - "samples": [ - 16.334814, - 16.340044, - 16.389374, - 16.327264, - 16.328601 - ] - }, - "rss_peak_kb": 38508, - "heap_allocated_kb": 24799, - "memory_bytes": 996000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:00.033769345Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 480447.52494141465, - "stddev": 6635.975766405758, - "n": 5, - "samples": [ - 492185.8119564731, - 479018.73969211546, - 476288.00182894594, - 477599.6225052584, - 477145.4487242801 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 2.0836, - "stddev": 0.028684490582891766, - "n": 5, - "samples": [ - 2.033, - 2.089, - 2.101, - 2.095, - 2.1 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 2.081705, - "stddev": 0.02825815638890834, - "n": 5, - "samples": [ - 2.031753, - 2.087601, - 2.09957, - 2.093804, - 2.095797 - ] - }, - "rss_peak_kb": 38508, - "heap_allocated_kb": 17719, - "memory_bytes": 996000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:00.033773468Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.177, - "stddev": 0.0029154759474226545, - "n": 5, - "samples": [ - 0.176, - 0.182, - 0.175, - 0.177, - 0.175 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.17553999999999997, - "stddev": 0.003180600257812981, - "n": 5, - "samples": [ - 0.174667, - 0.180989, - 0.173478, - 0.175423, - 0.173143 - ] - }, - "rss_peak_kb": 38508, - "heap_allocated_kb": 7918, - "memory_bytes": 996000, - "merge_folds_per_sec": { - "mean": 5698.175368215685, - "stddev": 101.28504249728955, - "n": 5, - "samples": [ - 5725.17991377879, - 5525.197663946427, - 5764.419695869217, - 5700.506775052302, - 5775.572792431689 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:00.033779659Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 2.039277, - "stddev": 0.0, - "n": 1, - "samples": [ - 2.039277 - ] - }, - "memory_bytes": 996000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:10.097782268Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 28004908.130135383, - "stddev": 1999702.9441665332, - "n": 5, - "samples": [ - 31119298.94443338, - 27291310.17392752, - 27937487.07891223, - 25601343.55850995, - 28075100.89489384 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7186, - "stddev": 0.05001299831043926, - "n": 5, - "samples": [ - 0.644, - 0.735, - 0.717, - 0.783, - 0.714 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.716998, - "stddev": 0.04979563395017678, - "n": 5, - "samples": [ - 0.642688, - 0.732834, - 0.715884, - 0.781209, - 0.712375 - ] - }, - "rss_peak_kb": 11528, - "heap_allocated_kb": 1063, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:20.170278751Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 24132674.06538065, - "stddev": 183561.08686353985, - "n": 5, - "samples": [ - 24090897.588379685, - 24063495.273242, - 24457289.6596018, - 24030694.66882068, - 24020993.1368591 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0414, - "stddev": 0.0020736441353327714, - "n": 5, - "samples": [ - 0.041, - 0.041, - 0.04, - 0.04, - 0.045 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0394504, - "stddev": 0.0002972108679035809, - "n": 5, - "samples": [ - 0.039517, - 0.039562, - 0.038925, - 0.039616, - 0.039632 - ] - }, - "rss_peak_kb": 11528, - "heap_allocated_kb": 745, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:20.170282046Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.003, - "stddev": 0.001224744871391589, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.002, - 0.002 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0020031999999999997, - "stddev": 0.0010345444408047437, - "n": 5, - "samples": [ - 0.003821, - 0.001707, - 0.001756, - 0.001277, - 0.001455 - ] - }, - "rss_peak_kb": 11528, - "heap_allocated_kb": 649, - "memory_bytes": 5440, - "merge_folds_per_sec": { - "mean": 577476.2673858211, - "stddev": 196325.0529098306, - "n": 5, - "samples": [ - 261711.59382360635, - 585823.0814294084, - 569476.0820045559, - 783085.3563038372, - 687285.2233676976 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:20.170288822Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.034593, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.034593 - ] - }, - "memory_bytes": 5440, - "accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:30.184145503Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 1050781.7264742262, - "stddev": 7029.401743054476, - "n": 5, - "samples": [ - 1041376.2203302152, - 1046629.9822857876, - 1057773.5833529285, - 1050784.8522218214, - 1057343.9941803787 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 18.2376, - "stddev": 1.8377795841721607, - "n": 5, - "samples": [ - 19.207, - 19.111, - 14.956, - 18.997, - 18.917 - ] - }, - "sys_ms": { - "mean": 0.7981999999999999, - "stddev": 1.7636635733608608, - "n": 5, - "samples": [ - 0.0, - 0.0, - 3.953, - 0.038, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 19.034131000000002, - "stddev": 0.1275074702007703, - "n": 5, - "samples": [ - 19.205355, - 19.10895, - 18.907638, - 19.033392, - 18.91532 - ] - }, - "rss_peak_kb": 282980, - "heap_allocated_kb": 243573, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:40.847913352Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 263992.41077985184, - "stddev": 11719.462220063848, - "n": 5, - "samples": [ - 265786.88972663874, - 251365.81145082167, - 274980.71235602145, - 252382.25519451458, - 275446.38517126284 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 2.1672000000000002, - "stddev": 1.981787501222066, - "n": 5, - "samples": [ - 3.583, - 3.789, - 3.464, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 1.4468, - "stddev": 1.9842205522572331, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 3.774, - 3.46 - ] - } - }, - "wall_time_ms": { - "mean": 3.6118902, - "stddev": 0.1612567617270668, - "n": 5, - "samples": [ - 3.581817, - 3.787309, - 3.462061, - 3.772056, - 3.456208 - ] - }, - "rss_peak_kb": 282980, - "heap_allocated_kb": 175234, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:40.847917723Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 1.5812, - "stddev": 1.5759705581006265, - "n": 5, - "samples": [ - 3.35, - 0.0, - 0.0, - 1.632, - 2.924 - ] - }, - "sys_ms": { - "mean": 1.5648, - "stddev": 1.6016370375337854, - "n": 5, - "samples": [ - 0.0, - 3.27, - 3.126, - 1.428, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 3.1441938, - "stddev": 0.1686617339920351, - "n": 5, - "samples": [ - 3.347632, - 3.268292, - 3.124724, - 3.057866, - 2.922455 - ] - }, - "rss_peak_kb": 282980, - "heap_allocated_kb": 77909, - "memory_bytes": 9960000, - "merge_folds_per_sec": { - "mean": 318.78412184328727, - "stddev": 17.2014878463438, - "n": 5, - "samples": [ - 298.7186166221377, - 305.97021318780577, - 320.0282648963556, - 327.0254484663488, - 342.17806604378853 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:40.847925832Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 3.619459, - "stddev": 0.0, - "n": 1, - "samples": [ - 3.619459 - ] - }, - "memory_bytes": 9960000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:54:50.944031928Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 570786343.5171742, - "stddev": 94251486.59796189, - "n": 5, - "samples": [ - 683971136.4180431, - 422038869.7799067, - 577934462.231983, - 593418983.4732814, - 576568265.6826569 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0372, - "stddev": 0.007049822692805827, - "n": 5, - "samples": [ - 0.03, - 0.049, - 0.036, - 0.035, - 0.036 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0359254, - "stddev": 0.006787974020280279, - "n": 5, - "samples": [ - 0.029241, - 0.047389, - 0.034606, - 0.033703, - 0.034688 - ] - }, - "rss_peak_kb": 19564, - "heap_allocated_kb": 3289, - "memory_bytes": 262144 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:01.014077118Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 18929845.303032693, - "stddev": 882427.9371693508, - "n": 5, - "samples": [ - 19540630.9653318, - 17718220.73329611, - 18347562.97338447, - 19863956.933605976, - 19178854.909545105 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.052000000000000005, - "stddev": 0.0024494897427831757, - "n": 5, - "samples": [ - 0.05, - 0.055, - 0.053, - 0.049, - 0.053 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.05038, - "stddev": 0.00238878368631402, - "n": 5, - "samples": [ - 0.048719, - 0.05373, - 0.051887, - 0.047926, - 0.049638 - ] - }, - "rss_peak_kb": 19600, - "heap_allocated_kb": 2157, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:01.014089591Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.04523, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.04523 - ] - }, - "memory_bytes": 290816, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:11.029581719Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "latency", - "operation": "prepare", - "cpu_time_ms": { - "user_ms": { - "mean": 0.562, - "stddev": 0.31469667935966533, - "n": 5, - "samples": [ - 0.731, - 0.705, - 0.683, - 0.691, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.13979999999999998, - "stddev": 0.3126023032544706, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.699 - ] - } - }, - "wall_time_ms": { - "mean": 0.6622604000000001, - "stddev": 0.019096538450724513, - "n": 5, - "samples": [ - 0.693298, - 0.664156, - 0.643068, - 0.65158, - 0.6592 - ] - }, - "rss_peak_kb": 18944, - "heap_allocated_kb": 1860, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:21.049786514Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 25174661.53374953, - "stddev": 1485342.7616920352, - "n": 5, - "samples": [ - 27825041.702781253, - 24510705.05043078, - 24536324.802053202, - 24353179.551122196, - 24648056.562360197 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7978, - "stddev": 0.043665776072342975, - "n": 5, - "samples": [ - 0.72, - 0.817, - 0.817, - 0.823, - 0.812 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7965072, - "stddev": 0.043593963821841254, - "n": 5, - "samples": [ - 0.718777, - 0.81597, - 0.815118, - 0.821248, - 0.811423 - ] - }, - "rss_peak_kb": 13252, - "heap_allocated_kb": 2221, - "memory_bytes": 54400 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:31.140036354Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 8576316.818916982, - "stddev": 681813.9449329216, - "n": 5, - "samples": [ - 9665563.38457165, - 8630067.445064908, - 8038503.757493878, - 8588182.228236355, - 7959267.279218119 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.11340000000000001, - "stddev": 0.008933084573650905, - "n": 5, - "samples": [ - 0.1, - 0.112, - 0.12, - 0.112, - 0.123 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.111539, - "stddev": 0.008437461940654901, - "n": 5, - "samples": [ - 0.098494, - 0.110312, - 0.11843, - 0.11085, - 0.119609 - ] - }, - "rss_peak_kb": 13260, - "heap_allocated_kb": 1573, - "memory_bytes": 54400 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:31.140045691Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.15159999999999998, - "stddev": 0.00527257053058563, - "n": 5, - "samples": [ - 0.159, - 0.15, - 0.147, - 0.155, - 0.147 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1499124, - "stddev": 0.004950865863664654, - "n": 5, - "samples": [ - 0.156944, - 0.148644, - 0.145692, - 0.152882, - 0.1454 - ] - }, - "rss_peak_kb": 13324, - "heap_allocated_kb": 977, - "memory_bytes": 54400, - "merge_folds_per_sec": { - "mean": 6676.309784024607, - "stddev": 217.58730442549117, - "n": 5, - "samples": [ - 6371.699459679886, - 6727.483114017384, - 6863.794854899376, - 6540.992399366833, - 6877.579092159559 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:31.140052236Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.152321, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.152321 - ] - }, - "memory_bytes": 54400, - "accuracy": { - "aae_all": 0.015756302521008403, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.05, - "accuracy_runs": 1, - "are_all": 0.007412989350329503, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0008494363929146537, - "l1_err": 15.0, - "l2_err": 6.557438524302, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.007412989350329503, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:41.154366854Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 23219202.465134893, - "stddev": 942870.5108129231, - "n": 5, - "samples": [ - 24883637.888324723, - 22855627.855525006, - 22938515.60277831, - 22873925.783260405, - 22544305.195786018 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.2978, - "stddev": 0.40994414253651684, - "n": 5, - "samples": [ - 0.804, - 0.0, - 0.0, - 0.0, - 0.685 - ] - }, - "sys_ms": { - "mean": 0.5658000000000001, - "stddev": 0.42937244904627964, - "n": 5, - "samples": [ - 0.001, - 0.876, - 0.873, - 0.876, - 0.203 - ] - } - }, - "wall_time_ms": { - "mean": 0.8624390000000001, - "stddev": 0.0333407782752592, - "n": 5, - "samples": [ - 0.803741, - 0.875058, - 0.871896, - 0.874358, - 0.887142 - ] - }, - "rss_peak_kb": 26588, - "heap_allocated_kb": 14094, - "memory_bytes": 544000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:51.219418192Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6238332.937434685, - "stddev": 46974.9745428271, - "n": 5, - "samples": [ - 6177526.0046591, - 6232609.9053978855, - 6211382.750363744, - 6285695.42108217, - 6284450.6056705285 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.1544, - "stddev": 0.0015165750888103107, - "n": 5, - "samples": [ - 0.155, - 0.154, - 0.155, - 0.152, - 0.156 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.15261180000000002, - "stddev": 0.0011500561725411582, - "n": 5, - "samples": [ - 0.154107, - 0.152745, - 0.153267, - 0.151455, - 0.151485 - ] - }, - "rss_peak_kb": 26588, - "heap_allocated_kb": 10114, - "memory_bytes": 544000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:51.219422361Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0954, - "stddev": 0.0011401754250991388, - "n": 5, - "samples": [ - 0.096, - 0.095, - 0.094, - 0.097, - 0.095 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0941534, - "stddev": 0.0009995512993338583, - "n": 5, - "samples": [ - 0.094111, - 0.093567, - 0.093057, - 0.095709, - 0.094323 - ] - }, - "rss_peak_kb": 26588, - "heap_allocated_kb": 4758, - "memory_bytes": 544000, - "merge_folds_per_sec": { - "mean": 10621.917451774545, - "stddev": 112.10824444149308, - "n": 5, - "samples": [ - 10625.750443625082, - 10687.528722733443, - 10746.101851553349, - 10448.338191810592, - 10601.86804915026 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:55:51.219429398Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.633519, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.633519 - ] - }, - "memory_bytes": 544000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:01.235904631Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 983985.5692719497, - "stddev": 48347.35884312693, - "n": 5, - "samples": [ - 1015734.489036035, - 1009347.0074955623, - 1004471.4549050827, - 898989.9802622255, - 991384.9146608431 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 20.3662, - "stddev": 1.0714138789468801, - "n": 5, - "samples": [ - 19.66, - 19.822, - 19.917, - 22.253, - 20.179 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 20.3673866, - "stddev": 1.0657642975455686, - "n": 5, - "samples": [ - 19.690185, - 19.814791, - 19.910969, - 22.247189, - 20.173799 - ] - }, - "rss_peak_kb": 14540, - "heap_allocated_kb": 2921, - "memory_bytes": 99600 - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:11.885475152Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 297007.43855232355, - "stddev": 18479.763243343983, - "n": 5, - "samples": [ - 328955.5522997863, - 297134.15357341274, - 285265.7541159024, - 287442.1303809725, - 286239.6023915439 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 3.2204, - "stddev": 0.1875467941608172, - "n": 5, - "samples": [ - 2.899, - 3.209, - 3.343, - 3.317, - 3.334 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 3.2146085999999996, - "stddev": 0.18694829023101558, - "n": 5, - "samples": [ - 2.894008, - 3.20394, - 3.337239, - 3.311971, - 3.325885 - ] - }, - "rss_peak_kb": 14608, - "heap_allocated_kb": 1943, - "memory_bytes": 99600 - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:11.885488542Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.3194, - "stddev": 0.011970797801316343, - "n": 5, - "samples": [ - 0.311, - 0.321, - 0.32, - 0.338, - 0.307 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.31707320000000005, - "stddev": 0.012142504239241588, - "n": 5, - "samples": [ - 0.308665, - 0.318765, - 0.317395, - 0.336013, - 0.304528 - ] - }, - "rss_peak_kb": 14672, - "heap_allocated_kb": 897, - "memory_bytes": 99600, - "merge_folds_per_sec": { - "mean": 3157.4718914817513, - "stddev": 118.41487861947662, - "n": 5, - "samples": [ - 3239.7583140297734, - 3137.1072733832134, - 3150.648245876589, - 2976.0753304187633, - 3283.770293700415 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:11.885502786Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 2.838657, - "stddev": 0.0, - "n": 1, - "samples": [ - 2.838657 - ] - }, - "memory_bytes": 99600, - "accuracy": { - "aae_all": 2.2815126050420167, - "aae_top1": 1.0, - "aae_top10": 0.8, - "aae_top100": 2.01, - "accuracy_runs": 1, - "are_all": 0.6369033391351014, - "are_top1": 0.0002805836139169473, - "are_top10": 0.001555601294898813, - "are_top100": 0.04553785988253641, - "l1_err": 2172.0, - "l2_err": 102.52804494381037, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.6369033391351014, - "relative_error_p99": 4.5 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:21.951503596Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 1216934.8677931523, - "stddev": 17588.6736754695, - "n": 5, - "samples": [ - 1230601.5660389408, - 1192526.9108604023, - 1223835.1689841005, - 1204714.4814631788, - 1232996.2116191399 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 15.669, - "stddev": 1.7911845242743694, - "n": 5, - "samples": [ - 16.255, - 16.772, - 12.492, - 16.604, - 16.222 - ] - }, - "sys_ms": { - "mean": 0.7711999999999999, - "stddev": 1.722778627682617, - "n": 5, - "samples": [ - 0.0, - 0.001, - 3.853, - 0.001, - 0.001 - ] - } - }, - "wall_time_ms": { - "mean": 16.4374976, - "stddev": 0.2390789495141724, - "n": 5, - "samples": [ - 16.252214, - 16.77111, - 16.34207, - 16.601444, - 16.22065 - ] - }, - "rss_peak_kb": 39244, - "heap_allocated_kb": 24773, - "memory_bytes": 996000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:32.542482687Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 316743.3788686749, - "stddev": 19624.004920500338, - "n": 5, - "samples": [ - 338155.9630713797, - 319552.5190607036, - 320086.71929268906, - 284482.18415380444, - 321439.5087647978 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 1.6515999999999997, - "stddev": 1.5933541037697803, - "n": 5, - "samples": [ - 0.0, - 1.938, - 2.977, - 3.343, - 0.0 - ] - }, - "sys_ms": { - "mean": 1.3668, - "stddev": 1.4575073584719906, - "n": 5, - "samples": [ - 2.818, - 1.043, - 0.0, - 0.005, - 2.968 - ] - } - }, - "wall_time_ms": { - "mean": 3.0153474, - "stddev": 0.19718704585316957, - "n": 5, - "samples": [ - 2.815269, - 2.979166, - 2.974194, - 3.346431, - 2.961677 - ] - }, - "rss_peak_kb": 39316, - "heap_allocated_kb": 17699, - "memory_bytes": 996000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:32.542489629Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.5328, - "stddev": 1.1057032603732342, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.157, - 2.507, - 0.0 - ] - }, - "sys_ms": { - "mean": 2.124, - "stddev": 1.2123172027155271, - "n": 5, - "samples": [ - 2.929, - 2.525, - 2.321, - 0.0, - 2.845 - ] - } - }, - "wall_time_ms": { - "mean": 2.6545592, - "stddev": 0.21302448069928506, - "n": 5, - "samples": [ - 2.926974, - 2.522156, - 2.475932, - 2.504864, - 2.84287 - ] - }, - "rss_peak_kb": 39380, - "heap_allocated_kb": 7878, - "memory_bytes": 996000, - "merge_folds_per_sec": { - "mean": 378.6009481680373, - "stddev": 29.455851150626135, - "n": 5, - "samples": [ - 341.649772085437, - 396.486180870652, - 403.8883135724244, - 399.2232712035464, - 351.75720310812665 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:32.542496954Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 2.506487, - "stddev": 0.0, - "n": 1, - "samples": [ - 2.506487 - ] - }, - "memory_bytes": 996000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:56:42.616696562Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 27980993.616275582, - "stddev": 1842098.5039640686, - "n": 5, - "samples": [ - 31242287.060381968, - 26710436.168067407, - 27310987.48337444, - 27351325.03494132, - 27289932.33461278 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7182, - "stddev": 0.04386000455996331, - "n": 5, - "samples": [ - 0.641, - 0.751, - 0.733, - 0.732, - 0.734 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7170664, - "stddev": 0.043596469791715914, - "n": 5, - "samples": [ - 0.640158, - 0.748771, - 0.732306, - 0.731226, - 0.732871 - ] - }, - "rss_peak_kb": 11284, - "heap_allocated_kb": 1111, - "memory_bytes": 10240 - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:29.368430923Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 23618370.59076393, - "stddev": 534531.4768930095, - "n": 5, - "samples": [ - 23597706.302947354, - 22864459.484177794, - 24091741.351064853, - 23378687.98803011, - 24159257.827599537 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.044399999999999995, - "stddev": 0.0011401754250991395, - "n": 5, - "samples": [ - 0.044, - 0.045, - 0.043, - 0.044, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.042357399999999996, - "stddev": 0.0009653956701788113, - "n": 5, - "samples": [ - 0.042377, - 0.043736, - 0.041508, - 0.042774, - 0.041392 - ] - }, - "rss_peak_kb": 11284, - "heap_allocated_kb": 793, - "memory_bytes": 10240 - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:29.368434163Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.004, - "stddev": 0.0017320508075688774, - "n": 5, - "samples": [ - 0.007, - 0.003, - 0.004, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0030032, - "stddev": 0.0019423232738141195, - "n": 5, - "samples": [ - 0.006468, - 0.00192, - 0.002121, - 0.002183, - 0.002324 - ] - }, - "rss_peak_kb": 11284, - "heap_allocated_kb": 657, - "memory_bytes": 10240, - "merge_folds_per_sec": { - "mean": 407058.8305226917, - "stddev": 144887.41174209333, - "n": 5, - "samples": [ - 154607.29746444031, - 520833.3333333334, - 471475.71900047146, - 458085.2038479157, - 430292.59896729776 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:29.368440582Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.048194, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.048194 - ] - }, - "memory_bytes": 10240, - "accuracy": { - "aae_all": 9.229, - "aae_top1": 0.0, - "aae_top10": 5.7, - "aae_top100": 9.32, - "aae_top1000": 9.229, - "accuracy_runs": 1, - "are_all": 0.4857875000848293, - "are_top1": 0.0, - "are_top10": 0.17943548387096775, - "are_top100": 0.3330711319229116, - "are_top1000": 0.48578750008482907, - "l1_err": 9229.0, - "l2_err": 467.7210707248499, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.4857875000848293, - "relative_error_p99": 2.3684210526315788 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:39.378928498Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 23866037.558692742, - "stddev": 1486734.5852393098, - "n": 5, - "samples": [ - 26506812.913589116, - 23146380.021896474, - 22952072.62953863, - 23301604.315457117, - 23423317.912982374 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.8417999999999999, - "stddev": 0.04838594837346897, - "n": 5, - "samples": [ - 0.756, - 0.866, - 0.872, - 0.86, - 0.855 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.840426, - "stddev": 0.04846758779328715, - "n": 5, - "samples": [ - 0.754523, - 0.864066, - 0.871381, - 0.85831, - 0.85385 - ] - }, - "rss_peak_kb": 13852, - "heap_allocated_kb": 2809, - "memory_bytes": 81920 - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:49.454214745Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6333722.406897154, - "stddev": 679420.7403474726, - "n": 5, - "samples": [ - 6643900.235194068, - 6530399.007379351, - 5123817.038741181, - 6668711.738266402, - 6701784.014904767 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.1614, - "stddev": 0.019932385707686878, - "n": 5, - "samples": [ - 0.152, - 0.154, - 0.197, - 0.151, - 0.153 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1595958, - "stddev": 0.019939546188416625, - "n": 5, - "samples": [ - 0.150514, - 0.15313, - 0.195167, - 0.149954, - 0.149214 - ] - }, - "rss_peak_kb": 13860, - "heap_allocated_kb": 1993, - "memory_bytes": 81920 - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:49.454224095Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.22399999999999998, - "stddev": 0.027973201461398728, - "n": 5, - "samples": [ - 0.274, - 0.213, - 0.211, - 0.21, - 0.212 - ] - } - }, - "wall_time_ms": { - "mean": 0.2226566, - "stddev": 0.027770196835816635, - "n": 5, - "samples": [ - 0.272297, - 0.211404, - 0.209545, - 0.208881, - 0.211156 - ] - }, - "rss_peak_kb": 13924, - "heap_allocated_kb": 1130, - "memory_bytes": 81920, - "merge_folds_per_sec": { - "mean": 4539.646927302015, - "stddev": 485.3692799128041, - "n": 5, - "samples": [ - 3672.4605853167677, - 4730.279464910787, - 4772.244625259491, - 4787.414843858464, - 4735.835117164561 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:49.454232591Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.05739, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.05739 - ] - }, - "memory_bytes": 81920, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:57:59.464130508Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 22514485.921863534, - "stddev": 998470.0989676868, - "n": 5, - "samples": [ - 24191724.253050275, - 22348616.061950363, - 22309750.811238315, - 22215829.00032102, - 21506509.48275769 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.8907999999999999, - "stddev": 0.038596631977414905, - "n": 5, - "samples": [ - 0.827, - 0.896, - 0.897, - 0.902, - 0.932 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.00044721359549995795, - "n": 5, - "samples": [ - 0.001, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.8896636000000001, - "stddev": 0.03798005779089853, - "n": 5, - "samples": [ - 0.826729, - 0.89491, - 0.896469, - 0.900259, - 0.929951 - ] - }, - "rss_peak_kb": 29312, - "heap_allocated_kb": 16782, - "memory_bytes": 655360 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:09.535935967Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6299878.957075936, - "stddev": 82005.50949390283, - "n": 5, - "samples": [ - 6260760.682422915, - 6262721.1523406925, - 6443132.908945646, - 6241651.790729899, - 6291128.250940524 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.16040000000000001, - "stddev": 0.0026076809620810583, - "n": 5, - "samples": [ - 0.161, - 0.161, - 0.156, - 0.161, - 0.163 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1587544, - "stddev": 0.0020350172726539663, - "n": 5, - "samples": [ - 0.159725, - 0.159675, - 0.155204, - 0.160214, - 0.158954 - ] - }, - "rss_peak_kb": 29312, - "heap_allocated_kb": 12046, - "memory_bytes": 655360 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:09.535940283Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.113, - "stddev": 0.003000000000000003, - "n": 5, - "samples": [ - 0.116, - 0.114, - 0.113, - 0.114, - 0.108 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1112552, - "stddev": 0.0029262140557382308, - "n": 5, - "samples": [ - 0.113776, - 0.111896, - 0.111722, - 0.112657, - 0.106225 - ] - }, - "rss_peak_kb": 29312, - "heap_allocated_kb": 5610, - "memory_bytes": 655360, - "merge_folds_per_sec": { - "mean": 8993.467868920761, - "stddev": 243.54759379354093, - "n": 5, - "samples": [ - 8789.199831247362, - 8936.869950668477, - 8950.78856447253, - 8876.501238271923, - 9413.979759943517 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:09.535948594Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.069832, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.069832 - ] - }, - "memory_bytes": 655360, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:19.550894769Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 27922645.889863245, - "stddev": 1888179.5330403177, - "n": 5, - "samples": [ - 31277807.926109307, - 26874857.227320977, - 27302934.246343456, - 26857714.54278098, - 27299915.506761506 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7198, - "stddev": 0.04497999555357912, - "n": 5, - "samples": [ - 0.64, - 0.745, - 0.734, - 0.746, - 0.734 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7186822, - "stddev": 0.04469853239984509, - "n": 5, - "samples": [ - 0.639431, - 0.74419, - 0.732522, - 0.744665, - 0.732603 - ] - }, - "rss_peak_kb": 11480, - "heap_allocated_kb": 1123, - "memory_bytes": 10240 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:29.666549460Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 23507935.060018077, - "stddev": 132860.1428471702, - "n": 5, - "samples": [ - 23491092.1383803, - 23589464.033501003, - 23467350.309364755, - 23320187.149401072, - 23671581.669443272 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0426, - "stddev": 0.001949358868961792, - "n": 5, - "samples": [ - 0.042, - 0.041, - 0.042, - 0.042, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.040498, - "stddev": 0.0002291353311909791, - "n": 5, - "samples": [ - 0.040526, - 0.040357, - 0.040567, - 0.040823, - 0.040217 - ] - }, - "rss_peak_kb": 11480, - "heap_allocated_kb": 805, - "memory_bytes": 10240 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:29.666553085Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0038, - "stddev": 0.0017888543819998318, - "n": 5, - "samples": [ - 0.007, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0026918000000000003, - "stddev": 0.00149803728258011, - "n": 5, - "samples": [ - 0.005353, - 0.002031, - 0.002257, - 0.002056, - 0.001762 - ] - }, - "rss_peak_kb": 11480, - "heap_allocated_kb": 669, - "memory_bytes": 10240, - "merge_folds_per_sec": { - "mean": 435232.7310234324, - "stddev": 145910.6673992023, - "n": 5, - "samples": [ - 186811.13394358303, - 492368.29148202855, - 443066.0168365086, - 486381.3229571985, - 567536.8898978434 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:29.666559855Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.046524, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.046524 - ] - }, - "memory_bytes": 10240, - "accuracy": { - "aae_all": 1.694327731092437, - "aae_top1": 2.0, - "aae_top10": 1.8, - "aae_top100": 1.46, - "accuracy_runs": 1, - "are_all": 0.49153700428012315, - "are_top1": 0.0005611672278338945, - "are_top10": 0.003950663328809479, - "are_top100": 0.03129160657746158, - "l1_err": 1613.0, - "l2_err": 107.81001808737442, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.49153700428012315, - "relative_error_p99": 5.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:39.680354299Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 23618218.139705643, - "stddev": 2653535.3827046547, - "n": 5, - "samples": [ - 27086287.431556337, - 23809353.74271136, - 23730872.91642936, - 23850637.766053863, - 19613938.8417773 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.4244, - "stddev": 0.4777324565067774, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.263, - 0.839, - 1.02 - ] - }, - "sys_ms": { - "mean": 0.4326, - "stddev": 0.4048361396911101, - "n": 5, - "samples": [ - 0.74, - 0.841, - 0.58, - 0.001, - 0.001 - ] - } - }, - "wall_time_ms": { - "mean": 0.8558812, - "stddev": 0.10168724905168784, - "n": 5, - "samples": [ - 0.738381, - 0.840006, - 0.842784, - 0.838552, - 1.019683 - ] - }, - "rss_peak_kb": 14200, - "heap_allocated_kb": 2821, - "memory_bytes": 81920 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:49.798211378Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6740846.250834807, - "stddev": 136710.9851419851, - "n": 5, - "samples": [ - 6636366.171262861, - 6566921.203843581, - 6801846.215401323, - 6905406.091554659, - 6793691.57211161 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.1432, - "stddev": 0.0027748873851023087, - "n": 5, - "samples": [ - 0.145, - 0.146, - 0.142, - 0.139, - 0.144 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.000447213595499958, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.001, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.14127520000000002, - "stddev": 0.0028749653389214904, - "n": 5, - "samples": [ - 0.143452, - 0.144969, - 0.139962, - 0.137863, - 0.14013 - ] - }, - "rss_peak_kb": 14208, - "heap_allocated_kb": 2005, - "memory_bytes": 81920 - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:49.798220413Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.2056, - "stddev": 0.00568330889535312, - "n": 5, - "samples": [ - 0.215, - 0.206, - 0.204, - 0.203, - 0.2 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.20420520000000003, - "stddev": 0.005583532278047665, - "n": 5, - "samples": [ - 0.213337, - 0.204454, - 0.203268, - 0.201521, - 0.198446 - ] - }, - "rss_peak_kb": 14272, - "heap_allocated_kb": 1142, - "memory_bytes": 81920, - "merge_folds_per_sec": { - "mean": 4899.904983840585, - "stddev": 131.23951331790553, - "n": 5, - "samples": [ - 4687.419434978461, - 4891.07574319896, - 4919.613515162249, - 4962.261997508945, - 5039.154228354313 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:49.798228851Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.041808, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.041808 - ] - }, - "memory_bytes": 81920, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:58:59.812679275Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 22930949.22290827, - "stddev": 1086404.7906464343, - "n": 5, - "samples": [ - 24777989.216619093, - 22519530.062446658, - 22801325.21302138, - 22645824.959095977, - 21910076.663358245 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.33940000000000003, - "stddev": 0.4656240973145613, - "n": 5, - "samples": [ - 0.808, - 0.889, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.5356000000000001, - "stddev": 0.4886637903507891, - "n": 5, - "samples": [ - 0.0, - 0.001, - 0.878, - 0.885, - 0.914 - ] - } - }, - "wall_time_ms": { - "mean": 0.8736829999999999, - "stddev": 0.039580136356511024, - "n": 5, - "samples": [ - 0.807168, - 0.888118, - 0.877142, - 0.883165, - 0.912822 - ] - }, - "rss_peak_kb": 29444, - "heap_allocated_kb": 16794, - "memory_bytes": 655360 - }, - "source": "cli", - "timestamp": "2026-09-08T16:59:10.266196678Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 6524202.751988709, - "stddev": 98217.2134102652, - "n": 5, - "samples": [ - 6482629.00567911, - 6498337.872613465, - 6659624.62662031, - 6578356.378310773, - 6402065.876719884 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0304, - "stddev": 0.06797646651599361, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.152 - ] - }, - "sys_ms": { - "mean": 0.1172, - "stddev": 0.0655377753665777, - "n": 5, - "samples": [ - 0.148, - 0.148, - 0.144, - 0.146, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.1459446, - "stddev": 0.0021912476582988012, - "n": 5, - "samples": [ - 0.146854, - 0.146499, - 0.142951, - 0.144717, - 0.148702 - ] - }, - "rss_peak_kb": 29444, - "heap_allocated_kb": 12058, - "memory_bytes": 655360 - }, - "source": "cli", - "timestamp": "2026-09-08T16:59:10.266200644Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.1084, - "stddev": 0.0030495901363953833, - "n": 5, - "samples": [ - 0.11, - 0.109, - 0.11, - 0.11, - 0.103 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.106782, - "stddev": 0.003362997100801607, - "n": 5, - "samples": [ - 0.108341, - 0.107246, - 0.108246, - 0.109184, - 0.100893 - ] - }, - "rss_peak_kb": 29444, - "heap_allocated_kb": 5622, - "memory_bytes": 655360, - "merge_folds_per_sec": { - "mean": 9372.60625346414, - "stddev": 306.91178929148936, - "n": 5, - "samples": [ - 9230.116022558404, - 9324.35708557895, - 9238.216654656986, - 9158.851113716295, - 9911.490390810066 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:59:10.266215474Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.06671, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.06671 - ] - }, - "memory_bytes": 655360, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:59:20.286100386Z" - } - ] -] diff --git a/tools/empirical-bench/results-sweep/planner-evidence.json b/tools/empirical-bench/results-sweep/planner-evidence.json deleted file mode 100644 index 1dc7ceb4..00000000 --- a/tools/empirical-bench/results-sweep/planner-evidence.json +++ /dev/null @@ -1,2194 +0,0 @@ -{ - "schema_version": 1, - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "records": [ - { - "id": "cms-uniform-seed42-w272-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886308, - "valid_until_unix_seconds": 1791478308, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 505.475, - "stddev": 2.9324591056398384, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 39.18329, - "stddev": 1.2404534228458564, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1540.0, - "stddev": 49.21381919745713, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 41.56236, - "stddev": 1.2531359914231197, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 1669, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 1.6347221960194194, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w30000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886328, - "valid_until_unix_seconds": 1791478328, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5313752.5, - "stddev": 285040.9840468121, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 958.89495, - "stddev": 0.37400001336898875, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 900674.8, - "stddev": 6828.900035876935, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1381.6785599999998, - "stddev": 1.1267877186941877, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2490679, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 2498560, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w2720-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 2720, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886379, - "valid_until_unix_seconds": 1791478379, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 9061.88984375, - "stddev": 4977.459586428361, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 34.73418, - "stddev": 0.27307644442536533, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 2460.0, - "stddev": 107.4406813083387, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 36.6688, - "stddev": 0.01859623617832312, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 13781, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 16384, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.006335943223443224, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.104, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.104, - "accuracy_runs": 1, - "are_all": 0.006335943223443224, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.006335943223443223, - "l1_err": 104.0, - "l2_err": 40.049968789001575, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.006335943223443224, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w27200-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 27200, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886399, - "valid_until_unix_seconds": 1791478399, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 31745.793103448275, - "stddev": 915.6813529123244, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 46.32539, - "stddev": 0.22768290833964674, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 37594.2, - "stddev": 2734.4467813435317, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 50.47502, - "stddev": 0.05519897643978545, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 136183, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 143360, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w300-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 300, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886419, - "valid_until_unix_seconds": 1791478419, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 6091.32, - "stddev": 99.73249556626484, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 757.95226, - "stddev": 0.2581798365480518, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8584.4, - "stddev": 165.01908980478592, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 2104.83466, - "stddev": 1.6008204155995156, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 29755, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 32768, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.3932923866316825, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.446, - "aae_top1": 9.0, - "aae_top10": 8.2, - "aae_top100": 6.92, - "aae_top1000": 7.446, - "accuracy_runs": 1, - "are_all": 0.3932923866316825, - "are_top1": 0.2195121951219512, - "are_top10": 0.2434299417440008, - "are_top100": 0.2454991949546276, - "are_top1000": 0.3932923866316827, - "l1_err": 7446.0, - "l2_err": 312.3747749098829, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.3932923866316825, - "relative_error_p99": 1.3846153846153846 - } - } - } - }, - { - "id": "countsketch-uniform-seed42-w3000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 3000, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886440, - "valid_until_unix_seconds": 1791478440, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 51035.7375, - "stddev": 951.9281311091058, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 774.44066, - "stddev": 0.6066855995901015, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 68290.8, - "stddev": 247.88848299184858, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1519.04208, - "stddev": 7.1756951556626465, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 251754, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 258048, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w272-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886460, - "valid_until_unix_seconds": 1791478460, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 413.40859375, - "stddev": 2.7002030472877463, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.40953, - "stddev": 0.1888592286598663, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1104.6, - "stddev": 114.85773809369572, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 35.77964285714286, - "stddev": 0.26766073908351545, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 1722, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 2.3164860214890104, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w30000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886480, - "valid_until_unix_seconds": 1791478480, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 4991299.4, - "stddev": 127408.84023557784, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 862.07043, - "stddev": 67.54045694576882, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 906510.0, - "stddev": 10240.438638066242, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1383.6344117647059, - "stddev": 2.9386960922807495, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2495217, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 2502656, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w2720-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 2720, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886531, - "valid_until_unix_seconds": 1791478531, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=2720' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 13362.875, - "stddev": 3039.657607879287, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.83039, - "stddev": 0.16780548039322382, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 2661.8, - "stddev": 223.53120587515292, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 37.005063025210085, - "stddev": 0.16744114940021262, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 54400.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 13933, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 16384, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.007412989350329503, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.015756302521008403, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.05, - "accuracy_runs": 1, - "are_all": 0.007412989350329503, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0008494363929146537, - "l1_err": 15.0, - "l2_err": 6.557438524302, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.007412989350329503, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w27200-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 27200, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886551, - "valid_until_unix_seconds": 1791478551, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=27200' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 29308.56551724138, - "stddev": 325.16572706768056, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 37.90535, - "stddev": 0.20893840898695612, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 33239.0, - "stddev": 1520.0851949808603, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 42.75764705882353, - "stddev": 0.029966574634030334, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 544000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 136338, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 143360, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w300-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 300, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886571, - "valid_until_unix_seconds": 1791478571, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=300' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5789.295, - "stddev": 50.43642858217649, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 756.83812, - "stddev": 0.15442492755380408, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8532.4, - "stddev": 65.54998093058457, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 2100.1955042016807, - "stddev": 4.949446360451842, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 99600.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 29853, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 32768, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.6369033391351014, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 2.2815126050420167, - "aae_top1": 1.0, - "aae_top10": 0.8, - "aae_top100": 2.01, - "accuracy_runs": 1, - "are_all": 0.6369033391351014, - "are_top1": 0.0002805836139169473, - "are_top10": 0.001555601294898813, - "are_top100": 0.04553785988253641, - "l1_err": 2172.0, - "l2_err": 102.52804494381036, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.6369033391351014, - "relative_error_p99": 4.5 - } - } - } - }, - { - "id": "countsketch-zipf-seed42-w3000-d83", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 3000, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886592, - "valid_until_unix_seconds": 1791478592, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=3000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 51510.1875, - "stddev": 1338.8413243535902, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 763.80445, - "stddev": 1.0832422484144655, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 68282.4, - "stddev": 462.2210510134734, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 1500.9115756302522, - "stddev": 13.696449994980448, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 996000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 254181, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 262144, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w512-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886649, - "valid_until_unix_seconds": 1791478649, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 653.75078125, - "stddev": 14.656944769230105, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 33.62379, - "stddev": 0.07565315095883289, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1184.0, - "stddev": 10.770329614269007, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 35.6547, - "stddev": 0.008609006911371453, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2759, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.4857875000848293, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 9.229, - "aae_top1": 0.0, - "aae_top10": 5.7, - "aae_top100": 9.32, - "aae_top1000": 9.229, - "accuracy_runs": 1, - "are_all": 0.4857875000848293, - "are_top1": 0.0, - "are_top10": 0.17943548387096775, - "are_top100": 0.3330711319229116, - "are_top1000": 0.485787500084829, - "l1_err": 9229.0, - "l2_err": 467.7210707248499, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.4857875000848293, - "relative_error_p99": 2.3684210526315788 - } - } - } - }, - { - "id": "cms-uniform-seed42-w4096-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 4096, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886669, - "valid_until_unix_seconds": 1791478669, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 4973.88, - "stddev": 300.623465532763, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 35.00645, - "stddev": 0.3773887451951894, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 5853.0, - "stddev": 1073.9336571688216, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 37.45286, - "stddev": 0.01899928946039723, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 20661, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 24576, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-uniform-seed42-w32768-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 32768, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886689, - "valid_until_unix_seconds": 1791478689, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 35327.308333333334, - "stddev": 703.0214501528393, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 42.568979999999996, - "stddev": 0.47701038982395344, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 42699.4, - "stddev": 3601.5573437056364, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 46.04674, - "stddev": 0.23154995789245925, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 164023, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 172032, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w512-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886709, - "valid_until_unix_seconds": 1791478709, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=512' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 739.0640625, - "stddev": 3.194833256007488, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 40.60954, - "stddev": 0.08235665121895089, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 1845.0, - "stddev": 327.10854467592253, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 43.60256302521008, - "stddev": 0.023270849185024416, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 10240.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 2913, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 4096, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.49153700428012315, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 1.694327731092437, - "aae_top1": 2.0, - "aae_top10": 1.8, - "aae_top100": 1.46, - "accuracy_runs": 1, - "are_all": 0.49153700428012315, - "are_top1": 0.0005611672278338945, - "are_top10": 0.003950663328809479, - "are_top100": 0.03129160657746158, - "l1_err": 1613.0, - "l2_err": 107.81001808737442, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.49153700428012315, - "relative_error_p99": 5.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w4096-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 4096, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886729, - "valid_until_unix_seconds": 1791478729, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=4096' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 5492.366153846154, - "stddev": 110.32925778298996, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 46.86758, - "stddev": 0.2167893926141219, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 8647.0, - "stddev": 13.30413469565007, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 51.65478991596639, - "stddev": 0.3125781503156082, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 81920.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 20818, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 24576, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42-w32768-d5", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 32768, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788886750, - "valid_until_unix_seconds": 1791478750, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=32768' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": { - "value": 37349.625, - "stddev": 337.66657026364135, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups" - }, - "update_cpu_ns": { - "value": 48.96084, - "stddev": 0.2723536519857951, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "merge_cpu_ns": { - "value": 48184.4, - "stddev": 857.3592012686398, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "read_cpu_ns": { - "value": 55.503865546218485, - "stddev": 0.030379887382542214, - "samples": 5, - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order" - }, - "retained_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 655360.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": { - "value": 164178, - "stddev": null, - "samples": 1, - "method": "actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key" - }, - "disk_bytes": { - "value": 172032, - "stddev": null, - "samples": 1, - "method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand" - } - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - } - ] -} diff --git a/tools/empirical-bench/results-sweep/raw.json b/tools/empirical-bench/results-sweep/raw.json deleted file mode 100644 index 41ae3260..00000000 --- a/tools/empirical-bench/results-sweep/raw.json +++ /dev/null @@ -1,4608 +0,0 @@ -[ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 5440, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:51:48.103893862Z", - "insert_throughput_items_per_sec": { - "mean": 28590919.77709379, - "stddev": 1609158.8508598115, - "n": 5, - "samples": [ - 31412115.96724973, - 27333606.66940003, - 28108718.90297292, - 28045141.459693525, - 28055015.886152744 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7024, - "stddev": 0.03748066168039188, - "n": 5, - "samples": [ - 0.637, - 0.733, - 0.713, - 0.715, - 0.714 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.0004472135954999579, - "n": 5, - "samples": [ - 0.0, - 0.001, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7011882, - "stddev": 0.03700154713927518, - "n": 5, - "samples": [ - 0.636697, - 0.7317, - 0.711523, - 0.713136, - 0.712885 - ] - }, - "insert_rss_peak_kb": 11296, - "insert_heap_allocated_kb": 1051, - "query_timestamp": "2026-09-08T16:51:58.116123539Z", - "query_throughput_items_per_sec": { - "mean": 24473073.58858718, - "stddev": 169053.16090350362, - "n": 5, - "samples": [ - 24592381.28027937, - 24225979.94088861, - 24376569.241644938, - 24537468.714727387, - 24632968.765395604 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.042800000000000005, - "stddev": 0.0017888543819998294, - "n": 5, - "samples": [ - 0.042, - 0.042, - 0.042, - 0.042, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0408628, - "stddev": 0.0002832820149603565, - "n": 5, - "samples": [ - 0.040663, - 0.041278, - 0.041023, - 0.040754, - 0.040596 - ] - }, - "query_rss_peak_kb": 11296, - "query_heap_allocated_kb": 733, - "merge_timestamp": "2026-09-08T16:51:48.103904851Z", - "merge_folds_per_sec": { - "mean": 501608.7408443724, - "stddev": 158760.43356765856, - "n": 5, - "samples": [ - 255950.8574353724, - 467726.8475210477, - 510725.2298263534, - 673400.6734006734, - 600240.0960384153 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0034, - "stddev": 0.0008944271909999159, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0022308, - "stddev": 0.0009705532958060573, - "n": 5, - "samples": [ - 0.003907, - 0.002138, - 0.001958, - 0.001485, - 0.001666 - ] - }, - "merge_rss_peak_kb": 11296, - "merge_heap_allocated_kb": 637, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 9960000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:52:08.791194355Z", - "insert_throughput_items_per_sec": { - "mean": 921478.5810593877, - "stddev": 7690.019883726106, - "n": 5, - "samples": [ - 929058.0559088556, - 913257.1049804568, - 928536.7908329278, - 913737.1378362878, - 922803.8157384098 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 20.1178, - "stddev": 2.2658516500424297, - "n": 5, - "samples": [ - 17.571, - 21.876, - 21.541, - 21.89, - 17.711 - ] - }, - "sys_ms": { - "mean": 1.5894, - "stddev": 2.164989792123741, - "n": 5, - "samples": [ - 3.958, - 0.025, - 0.0, - 0.0, - 3.964 - ] - } - }, - "insert_wall_time_ms": { - "mean": 21.705459, - "stddev": 0.1813336608258377, - "n": 5, - "samples": [ - 21.52718, - 21.899638, - 21.539265, - 21.888133, - 21.673079 - ] - }, - "insert_rss_peak_kb": 282556, - "insert_heap_allocated_kb": 243573, - "query_timestamp": "2026-09-08T16:52:18.902251139Z", - "query_throughput_items_per_sec": { - "mean": 268207.4355130188, - "stddev": 12903.457164889896, - "n": 5, - "samples": [ - 281195.15815681074, - 256320.15001905744, - 278226.9597472364, - 252803.9113821169, - 272490.9982598725 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 3.6566, - "stddev": 0.3205811909641613, - "n": 5, - "samples": [ - 3.151, - 3.904, - 3.596, - 3.957, - 3.675 - ] - }, - "sys_ms": { - "mean": 0.0814, - "stddev": 0.18201593336848287, - "n": 5, - "samples": [ - 0.407, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.7354578, - "stddev": 0.1819224065520792, - "n": 5, - "samples": [ - 3.556249, - 3.901371, - 3.594188, - 3.955635, - 3.669846 - ] - }, - "query_rss_peak_kb": 282556, - "query_heap_allocated_kb": 175245, - "merge_timestamp": "2026-09-08T16:52:08.791206619Z", - "merge_folds_per_sec": { - "mean": 316.98194388143827, - "stddev": 7.827645548918142, - "n": 5, - "samples": [ - 305.61861486308896, - 322.0760247573399, - 320.3648571284865, - 324.5244418828649, - 312.3257807754112 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 1.596, - "stddev": 1.5730268592748184, - "n": 5, - "samples": [ - 0.0, - 0.0, - 1.694, - 3.083, - 3.203 - ] - }, - "sys_ms": { - "mean": 1.5618, - "stddev": 1.5978310924500123, - "n": 5, - "samples": [ - 3.274, - 3.106, - 1.429, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 3.1563134, - "stddev": 0.07895276971899076, - "n": 5, - "samples": [ - 3.272052, - 3.104857, - 3.121441, - 3.081432, - 3.201785 - ] - }, - "merge_rss_peak_kb": 282556, - "merge_heap_allocated_kb": 77909, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms", - "impl": "polars", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 262144, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:52:28.929676697Z", - "insert_throughput_items_per_sec": { - "mean": 571845728.2743416, - "stddev": 78709030.93591695, - "n": 5, - "samples": [ - 671817265.7037286, - 451803826.7784128, - 568084985.5138328, - 590005310.0477904, - 577517253.3279432 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.0366, - "stddev": 0.0051283525619832335, - "n": 5, - "samples": [ - 0.031, - 0.045, - 0.036, - 0.035, - 0.036 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.0355544, - "stddev": 0.005317104315320511, - "n": 5, - "samples": [ - 0.02977, - 0.044267, - 0.035206, - 0.033898, - 0.034631 - ] - }, - "insert_rss_peak_kb": 19476, - "insert_heap_allocated_kb": 3185, - "query_timestamp": "2026-09-08T16:52:38.943261347Z", - "query_throughput_items_per_sec": { - "mean": 19775757.807094183, - "stddev": 838476.1546876673, - "n": 5, - "samples": [ - 19481784.531463083, - 20583331.618055698, - 18481555.407703113, - 20382788.773159944, - 19949328.705089074 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0526, - "stddev": 0.0023021728866442675, - "n": 5, - "samples": [ - 0.053, - 0.05, - 0.056, - 0.051, - 0.053 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0506418, - "stddev": 0.0022074174276742508, - "n": 5, - "samples": [ - 0.05133, - 0.048583, - 0.054108, - 0.049061, - 0.050127 - ] - }, - "query_rss_peak_kb": 19492, - "query_heap_allocated_kb": 2053, - "merge_timestamp": null, - "merge_shards": null, - "merge_supported": null, - "merge_cpu_time_ms": null, - "merge_wall_time_ms": null, - "merge_rss_peak_kb": null, - "merge_heap_allocated_kb": null, - "prepare_timestamp": "2026-09-08T16:52:48.962964572Z", - "prepare_cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.862, - "stddev": 0.01598436736314578, - "n": 5, - "samples": [ - 0.842, - 0.863, - 0.872, - 0.851, - 0.882 - ] - } - }, - "prepare_wall_time_ms": { - "mean": 0.8168664, - "stddev": 0.009893839158789669, - "n": 5, - "samples": [ - 0.802512, - 0.822305, - 0.821603, - 0.811058, - 0.826854 - ] - }, - "prepare_rss_peak_kb": 18288, - "prepare_heap_allocated_kb": 1834 - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 54400, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:52:59.017545868Z", - "insert_throughput_items_per_sec": { - "mean": 24990558.51326956, - "stddev": 1579868.8793788734, - "n": 5, - "samples": [ - 27797854.005670764, - 24403338.376689933, - 24401790.115322854, - 23973686.48171767, - 24376123.586946588 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.8038, - "stddev": 0.04668725736215394, - "n": 5, - "samples": [ - 0.721, - 0.82, - 0.821, - 0.835, - 0.822 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8026749999999999, - "stddev": 0.04692298889670179, - "n": 5, - "samples": [ - 0.71948, - 0.81956, - 0.819612, - 0.834248, - 0.820475 - ] - }, - "insert_rss_peak_kb": 12856, - "insert_heap_allocated_kb": 2209, - "query_timestamp": "2026-09-08T16:53:09.029761284Z", - "query_throughput_items_per_sec": { - "mean": 8857763.573752059, - "stddev": 411812.6739818057, - "n": 5, - "samples": [ - 9182061.923825614, - 8637368.711995577, - 8233773.291286197, - 9116019.58121006, - 9119594.360442849 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.104, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.104, - "accuracy_runs": 1, - "are_all": 0.006335943223443224, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.006335943223443223, - "l1_err": 104.0, - "l2_err": 40.049968789001575, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.006335943223443224, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1148, - "stddev": 0.005310367218940701, - "n": 5, - "samples": [ - 0.11, - 0.117, - 0.123, - 0.111, - 0.113 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.1130972, - "stddev": 0.005429740481827841, - "n": 5, - "samples": [ - 0.108908, - 0.115776, - 0.121451, - 0.109697, - 0.109654 - ] - }, - "query_rss_peak_kb": 12928, - "query_heap_allocated_kb": 1561, - "merge_timestamp": "2026-09-08T16:52:59.017563648Z", - "merge_folds_per_sec": { - "mean": 6720.021553902316, - "stddev": 406.6799378841053, - "n": 5, - "samples": [ - 6730.879254757048, - 6086.390222822746, - 7137.4021283733155, - 6642.929266089175, - 7002.506897469295 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.1502, - "stddev": 0.009311283477587834, - "n": 5, - "samples": [ - 0.149, - 0.165, - 0.141, - 0.152, - 0.144 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.1492638, - "stddev": 0.009404371201733798, - "n": 5, - "samples": [ - 0.148569, - 0.164301, - 0.140107, - 0.150536, - 0.142806 - ] - }, - "merge_rss_peak_kb": 13056, - "merge_heap_allocated_kb": 965, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 544000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:53:19.095980355Z", - "insert_throughput_items_per_sec": { - "mean": 22728722.29657367, - "stddev": 1071124.792702381, - "n": 5, - "samples": [ - 24596766.755010057, - 22410018.17452474, - 22438177.212235987, - 22345669.632681884, - 21852979.70841569 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.3072, - "stddev": 0.4219066247405935, - "n": 5, - "samples": [ - 0.814, - 0.0, - 0.0, - 0.0, - 0.722 - ] - }, - "sys_ms": { - "mean": 0.5758000000000001, - "stddev": 0.4420369894024708, - "n": 5, - "samples": [ - 0.0, - 0.895, - 0.893, - 0.896, - 0.195 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8814292, - "stddev": 0.039409757049492185, - "n": 5, - "samples": [ - 0.813115, - 0.892458, - 0.891338, - 0.895028, - 0.915207 - ] - }, - "insert_rss_peak_kb": 26264, - "insert_heap_allocated_kb": 14082, - "query_timestamp": "2026-09-08T16:53:29.111049162Z", - "query_throughput_items_per_sec": { - "mean": 6364974.272871866, - "stddev": 52458.99915142277, - "n": 5, - "samples": [ - 6286421.9572146125, - 6373323.815836435, - 6416631.909910488, - 6405288.205942826, - 6343205.475454967 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1588, - "stddev": 0.0021679483388678815, - "n": 5, - "samples": [ - 0.16, - 0.158, - 0.157, - 0.157, - 0.162 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.0004472135954999579, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.001, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.15711840000000002, - "stddev": 0.001300415241374835, - "n": 5, - "samples": [ - 0.159073, - 0.156904, - 0.155845, - 0.156121, - 0.157649 - ] - }, - "query_rss_peak_kb": 26640, - "query_heap_allocated_kb": 10102, - "merge_timestamp": "2026-09-08T16:53:19.095992785Z", - "merge_folds_per_sec": { - "mean": 10635.03536783152, - "stddev": 87.92375862897931, - "n": 5, - "samples": [ - 10603.779186902211, - 10678.96883876893, - 10658.026559802189, - 10733.068584308254, - 10501.33366937601 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0954, - "stddev": 0.0011401754250991403, - "n": 5, - "samples": [ - 0.096, - 0.095, - 0.095, - 0.094, - 0.097 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.0004472135954999579, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.001 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.094034, - "stddev": 0.0007807483589480032, - "n": 5, - "samples": [ - 0.094306, - 0.093642, - 0.093826, - 0.09317, - 0.095226 - ] - }, - "merge_rss_peak_kb": 26640, - "merge_heap_allocated_kb": 4746, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 99600, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:53:39.490777022Z", - "insert_throughput_items_per_sec": { - "mean": 1311310.924690102, - "stddev": 5087.0670143445095, - "n": 5, - "samples": [ - 1319582.5790819242, - 1311256.8383683192, - 1305805.729797194, - 1309211.718387512, - 1310697.7578155596 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 15.2536, - "stddev": 0.05943315572977692, - "n": 5, - "samples": [ - 15.157, - 15.254, - 15.318, - 15.278, - 15.261 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 15.252096, - "stddev": 0.059000250152012115, - "n": 5, - "samples": [ - 15.156308, - 15.252542, - 15.316214, - 15.276368, - 15.259048 - ] - }, - "insert_rss_peak_kb": 14340, - "insert_heap_allocated_kb": 2912, - "query_timestamp": "2026-09-08T16:53:49.554573010Z", - "query_throughput_items_per_sec": { - "mean": 444296.29919579526, - "stddev": 11054.849402443224, - "n": 5, - "samples": [ - 463929.0522578963, - 441097.78652719746, - 437434.02948042896, - 439148.8943109139, - 439871.7334025398 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 7.446, - "aae_top1": 9.0, - "aae_top10": 8.2, - "aae_top100": 6.92, - "aae_top1000": 7.446, - "accuracy_runs": 1, - "are_all": 0.3932923866316825, - "are_top1": 0.2195121951219512, - "are_top10": 0.2434299417440008, - "are_top100": 0.2454991949546276, - "are_top1000": 0.3932923866316827, - "l1_err": 7446.0, - "l2_err": 312.3747749098829, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.3932923866316825, - "relative_error_p99": 1.3846153846153846 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 2.2533999999999996, - "stddev": 0.05490719442841725, - "n": 5, - "samples": [ - 2.156, - 2.268, - 2.288, - 2.278, - 2.277 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 2.2518308, - "stddev": 0.05428632633269639, - "n": 5, - "samples": [ - 2.155502, - 2.267071, - 2.286059, - 2.277132, - 2.27339 - ] - }, - "query_rss_peak_kb": 14348, - "query_heap_allocated_kb": 1953, - "merge_timestamp": "2026-09-08T16:53:39.490802709Z", - "merge_folds_per_sec": { - "mean": 3907.6092853175383, - "stddev": 45.84247420699244, - "n": 5, - "samples": [ - 3872.2918159112473, - 3878.5246092386456, - 3912.118177265899, - 3984.984578109683, - 3890.1272460622185 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.2572, - "stddev": 0.0024899799195977554, - "n": 5, - "samples": [ - 0.259, - 0.259, - 0.257, - 0.253, - 0.258 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.25593879999999997, - "stddev": 0.0029676058869061417, - "n": 5, - "samples": [ - 0.258245, - 0.25783, - 0.255616, - 0.250942, - 0.257061 - ] - }, - "merge_rss_peak_kb": 14412, - "merge_heap_allocated_kb": 912, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 996000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:54:00.033769345Z", - "insert_throughput_items_per_sec": { - "mean": 1223691.645571603, - "stddev": 1932.8434335010577, - "n": 5, - "samples": [ - 1224378.8022318466, - 1223986.9121527455, - 1220302.8620861296, - 1224944.9754717017, - 1224844.6759155912 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 16.3452, - "stddev": 0.025635912310663263, - "n": 5, - "samples": [ - 16.336, - 16.342, - 16.39, - 16.328, - 16.33 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 16.3440194, - "stddev": 0.025865292493997084, - "n": 5, - "samples": [ - 16.334814, - 16.340044, - 16.389374, - 16.327264, - 16.328601 - ] - }, - "insert_rss_peak_kb": 38508, - "insert_heap_allocated_kb": 24799, - "query_timestamp": "2026-09-08T16:54:10.097782268Z", - "query_throughput_items_per_sec": { - "mean": 480447.52494141465, - "stddev": 6635.975766405758, - "n": 5, - "samples": [ - 492185.8119564731, - 479018.73969211546, - 476288.00182894594, - 477599.6225052584, - 477145.4487242801 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 2.0836, - "stddev": 0.02868449058289177, - "n": 5, - "samples": [ - 2.033, - 2.089, - 2.101, - 2.095, - 2.1 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 2.081705, - "stddev": 0.02825815638890834, - "n": 5, - "samples": [ - 2.031753, - 2.087601, - 2.09957, - 2.093804, - 2.095797 - ] - }, - "query_rss_peak_kb": 38508, - "query_heap_allocated_kb": 17719, - "merge_timestamp": "2026-09-08T16:54:00.033779659Z", - "merge_folds_per_sec": { - "mean": 5698.175368215685, - "stddev": 101.28504249728957, - "n": 5, - "samples": [ - 5725.17991377879, - 5525.197663946427, - 5764.419695869217, - 5700.506775052302, - 5775.572792431689 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.177, - "stddev": 0.0029154759474226545, - "n": 5, - "samples": [ - 0.176, - 0.182, - 0.175, - 0.177, - 0.175 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.17553999999999997, - "stddev": 0.003180600257812981, - "n": 5, - "samples": [ - 0.174667, - 0.180989, - 0.173478, - 0.175423, - 0.173143 - ] - }, - "merge_rss_peak_kb": 38508, - "merge_heap_allocated_kb": 7918, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 5440, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:54:20.170278751Z", - "insert_throughput_items_per_sec": { - "mean": 28004908.130135383, - "stddev": 1999702.9441665332, - "n": 5, - "samples": [ - 31119298.94443338, - 27291310.17392752, - 27937487.07891223, - 25601343.55850995, - 28075100.89489384 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7186, - "stddev": 0.05001299831043926, - "n": 5, - "samples": [ - 0.644, - 0.735, - 0.717, - 0.783, - 0.714 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.716998, - "stddev": 0.04979563395017678, - "n": 5, - "samples": [ - 0.642688, - 0.732834, - 0.715884, - 0.781209, - 0.712375 - ] - }, - "insert_rss_peak_kb": 11528, - "insert_heap_allocated_kb": 1063, - "query_timestamp": "2026-09-08T16:54:30.184145503Z", - "query_throughput_items_per_sec": { - "mean": 24132674.06538065, - "stddev": 183561.08686353985, - "n": 5, - "samples": [ - 24090897.588379685, - 24063495.273242, - 24457289.6596018, - 24030694.66882068, - 24020993.1368591 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0414, - "stddev": 0.0020736441353327714, - "n": 5, - "samples": [ - 0.041, - 0.041, - 0.04, - 0.04, - 0.045 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0394504, - "stddev": 0.0002972108679035809, - "n": 5, - "samples": [ - 0.039517, - 0.039562, - 0.038925, - 0.039616, - 0.039632 - ] - }, - "query_rss_peak_kb": 11528, - "query_heap_allocated_kb": 745, - "merge_timestamp": "2026-09-08T16:54:20.170288822Z", - "merge_folds_per_sec": { - "mean": 577476.2673858211, - "stddev": 196325.0529098306, - "n": 5, - "samples": [ - 261711.59382360635, - 585823.0814294084, - 569476.0820045559, - 783085.3563038372, - 687285.2233676976 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.003, - "stddev": 0.001224744871391589, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.002, - 0.002 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0020031999999999997, - "stddev": 0.0010345444408047437, - "n": 5, - "samples": [ - 0.003821, - 0.001707, - 0.001756, - 0.001277, - 0.001455 - ] - }, - "merge_rss_peak_kb": 11528, - "merge_heap_allocated_kb": 649, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 9960000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:54:40.847913352Z", - "insert_throughput_items_per_sec": { - "mean": 1050781.7264742262, - "stddev": 7029.401743054476, - "n": 5, - "samples": [ - 1041376.2203302152, - 1046629.9822857876, - 1057773.5833529285, - 1050784.8522218214, - 1057343.9941803787 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 18.2376, - "stddev": 1.8377795841721607, - "n": 5, - "samples": [ - 19.207, - 19.111, - 14.956, - 18.997, - 18.917 - ] - }, - "sys_ms": { - "mean": 0.7981999999999999, - "stddev": 1.7636635733608608, - "n": 5, - "samples": [ - 0.0, - 0.0, - 3.953, - 0.038, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 19.034131, - "stddev": 0.1275074702007703, - "n": 5, - "samples": [ - 19.205355, - 19.10895, - 18.907638, - 19.033392, - 18.91532 - ] - }, - "insert_rss_peak_kb": 282980, - "insert_heap_allocated_kb": 243573, - "query_timestamp": "2026-09-08T16:54:50.944031928Z", - "query_throughput_items_per_sec": { - "mean": 263992.41077985184, - "stddev": 11719.462220063848, - "n": 5, - "samples": [ - 265786.88972663874, - 251365.81145082167, - 274980.71235602145, - 252382.25519451455, - 275446.38517126284 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 2.1672, - "stddev": 1.981787501222066, - "n": 5, - "samples": [ - 3.583, - 3.789, - 3.464, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 1.4468, - "stddev": 1.9842205522572331, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 3.774, - 3.46 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.6118902, - "stddev": 0.1612567617270668, - "n": 5, - "samples": [ - 3.581817, - 3.787309, - 3.462061, - 3.772056, - 3.456208 - ] - }, - "query_rss_peak_kb": 282980, - "query_heap_allocated_kb": 175234, - "merge_timestamp": "2026-09-08T16:54:40.847925832Z", - "merge_folds_per_sec": { - "mean": 318.78412184328727, - "stddev": 17.2014878463438, - "n": 5, - "samples": [ - 298.7186166221377, - 305.97021318780577, - 320.0282648963556, - 327.0254484663488, - 342.17806604378853 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 1.5812, - "stddev": 1.5759705581006265, - "n": 5, - "samples": [ - 3.35, - 0.0, - 0.0, - 1.632, - 2.924 - ] - }, - "sys_ms": { - "mean": 1.5648, - "stddev": 1.6016370375337854, - "n": 5, - "samples": [ - 0.0, - 3.27, - 3.126, - 1.428, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 3.1441938, - "stddev": 0.1686617339920351, - "n": 5, - "samples": [ - 3.347632, - 3.268292, - 3.124724, - 3.057866, - 2.922455 - ] - }, - "merge_rss_peak_kb": 282980, - "merge_heap_allocated_kb": 77909, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms", - "impl": "polars", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 262144, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:55:01.014077118Z", - "insert_throughput_items_per_sec": { - "mean": 570786343.5171742, - "stddev": 94251486.59796187, - "n": 5, - "samples": [ - 683971136.4180431, - 422038869.7799067, - 577934462.231983, - 593418983.4732814, - 576568265.6826569 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.0372, - "stddev": 0.007049822692805827, - "n": 5, - "samples": [ - 0.03, - 0.049, - 0.036, - 0.035, - 0.036 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.0359254, - "stddev": 0.006787974020280279, - "n": 5, - "samples": [ - 0.029241, - 0.047389, - 0.034606, - 0.033703, - 0.034688 - ] - }, - "insert_rss_peak_kb": 19564, - "insert_heap_allocated_kb": 3289, - "query_timestamp": "2026-09-08T16:55:11.029581719Z", - "query_throughput_items_per_sec": { - "mean": 18929845.303032693, - "stddev": 882427.9371693508, - "n": 5, - "samples": [ - 19540630.9653318, - 17718220.73329611, - 18347562.97338447, - 19863956.933605976, - 19178854.909545105 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.052000000000000005, - "stddev": 0.0024494897427831757, - "n": 5, - "samples": [ - 0.05, - 0.055, - 0.053, - 0.049, - 0.053 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.05038, - "stddev": 0.00238878368631402, - "n": 5, - "samples": [ - 0.048719, - 0.05373, - 0.051887, - 0.047926, - 0.049638 - ] - }, - "query_rss_peak_kb": 19600, - "query_heap_allocated_kb": 2157, - "merge_timestamp": null, - "merge_shards": null, - "merge_supported": null, - "merge_cpu_time_ms": null, - "merge_wall_time_ms": null, - "merge_rss_peak_kb": null, - "merge_heap_allocated_kb": null, - "prepare_timestamp": "2026-09-08T16:55:21.049786514Z", - "prepare_cpu_time_ms": { - "user_ms": { - "mean": 0.562, - "stddev": 0.31469667935966533, - "n": 5, - "samples": [ - 0.731, - 0.705, - 0.683, - 0.691, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.13979999999999998, - "stddev": 0.3126023032544706, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.699 - ] - } - }, - "prepare_wall_time_ms": { - "mean": 0.6622604000000001, - "stddev": 0.019096538450724513, - "n": 5, - "samples": [ - 0.693298, - 0.664156, - 0.643068, - 0.65158, - 0.6592 - ] - }, - "prepare_rss_peak_kb": 18944, - "prepare_heap_allocated_kb": 1860 - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 54400, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:55:31.140036354Z", - "insert_throughput_items_per_sec": { - "mean": 25174661.53374953, - "stddev": 1485342.7616920352, - "n": 5, - "samples": [ - 27825041.702781253, - 24510705.05043078, - 24536324.8020532, - 24353179.551122196, - 24648056.562360197 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7978, - "stddev": 0.043665776072342975, - "n": 5, - "samples": [ - 0.72, - 0.817, - 0.817, - 0.823, - 0.812 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7965072, - "stddev": 0.043593963821841254, - "n": 5, - "samples": [ - 0.718777, - 0.81597, - 0.815118, - 0.821248, - 0.811423 - ] - }, - "insert_rss_peak_kb": 13252, - "insert_heap_allocated_kb": 2221, - "query_timestamp": "2026-09-08T16:55:41.154366854Z", - "query_throughput_items_per_sec": { - "mean": 8576316.818916982, - "stddev": 681813.9449329216, - "n": 5, - "samples": [ - 9665563.38457165, - 8630067.445064908, - 8038503.757493878, - 8588182.228236355, - 7959267.279218119 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.015756302521008403, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.05, - "accuracy_runs": 1, - "are_all": 0.007412989350329503, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0008494363929146537, - "l1_err": 15.0, - "l2_err": 6.557438524302, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.007412989350329503, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1134, - "stddev": 0.008933084573650905, - "n": 5, - "samples": [ - 0.1, - 0.112, - 0.12, - 0.112, - 0.123 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.111539, - "stddev": 0.008437461940654901, - "n": 5, - "samples": [ - 0.098494, - 0.110312, - 0.11843, - 0.11085, - 0.119609 - ] - }, - "query_rss_peak_kb": 13260, - "query_heap_allocated_kb": 1573, - "merge_timestamp": "2026-09-08T16:55:31.140052236Z", - "merge_folds_per_sec": { - "mean": 6676.309784024607, - "stddev": 217.58730442549117, - "n": 5, - "samples": [ - 6371.699459679886, - 6727.483114017384, - 6863.794854899376, - 6540.992399366833, - 6877.579092159559 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.15159999999999998, - "stddev": 0.00527257053058563, - "n": 5, - "samples": [ - 0.159, - 0.15, - 0.147, - 0.155, - 0.147 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.1499124, - "stddev": 0.004950865863664654, - "n": 5, - "samples": [ - 0.156944, - 0.148644, - 0.145692, - 0.152882, - 0.1454 - ] - }, - "merge_rss_peak_kb": 13324, - "merge_heap_allocated_kb": 977, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 544000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:55:51.219418192Z", - "insert_throughput_items_per_sec": { - "mean": 23219202.465134893, - "stddev": 942870.5108129232, - "n": 5, - "samples": [ - 24883637.888324723, - 22855627.85552501, - 22938515.60277831, - 22873925.783260405, - 22544305.195786014 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.2978, - "stddev": 0.4099441425365168, - "n": 5, - "samples": [ - 0.804, - 0.0, - 0.0, - 0.0, - 0.685 - ] - }, - "sys_ms": { - "mean": 0.5658000000000001, - "stddev": 0.4293724490462797, - "n": 5, - "samples": [ - 0.001, - 0.876, - 0.873, - 0.876, - 0.203 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8624390000000001, - "stddev": 0.0333407782752592, - "n": 5, - "samples": [ - 0.803741, - 0.875058, - 0.871896, - 0.874358, - 0.887142 - ] - }, - "insert_rss_peak_kb": 26588, - "insert_heap_allocated_kb": 14094, - "query_timestamp": "2026-09-08T16:56:01.235904631Z", - "query_throughput_items_per_sec": { - "mean": 6238332.937434685, - "stddev": 46974.9745428271, - "n": 5, - "samples": [ - 6177526.0046591, - 6232609.9053978855, - 6211382.750363744, - 6285695.42108217, - 6284450.6056705285 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1544, - "stddev": 0.0015165750888103107, - "n": 5, - "samples": [ - 0.155, - 0.154, - 0.155, - 0.152, - 0.156 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.15261180000000002, - "stddev": 0.0011500561725411582, - "n": 5, - "samples": [ - 0.154107, - 0.152745, - 0.153267, - 0.151455, - 0.151485 - ] - }, - "query_rss_peak_kb": 26588, - "query_heap_allocated_kb": 10114, - "merge_timestamp": "2026-09-08T16:55:51.219429398Z", - "merge_folds_per_sec": { - "mean": 10621.917451774543, - "stddev": 112.10824444149308, - "n": 5, - "samples": [ - 10625.750443625082, - 10687.528722733445, - 10746.101851553349, - 10448.338191810592, - 10601.86804915026 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0954, - "stddev": 0.0011401754250991388, - "n": 5, - "samples": [ - 0.096, - 0.095, - 0.094, - 0.097, - 0.095 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0941534, - "stddev": 0.0009995512993338585, - "n": 5, - "samples": [ - 0.094111, - 0.093567, - 0.093057, - 0.095709, - 0.094323 - ] - }, - "merge_rss_peak_kb": 26588, - "merge_heap_allocated_kb": 4758, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 99600, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:56:11.885475152Z", - "insert_throughput_items_per_sec": { - "mean": 983985.5692719496, - "stddev": 48347.35884312693, - "n": 5, - "samples": [ - 1015734.489036035, - 1009347.0074955624, - 1004471.4549050828, - 898989.9802622255, - 991384.9146608432 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 20.3662, - "stddev": 1.07141387894688, - "n": 5, - "samples": [ - 19.66, - 19.822, - 19.917, - 22.253, - 20.179 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 20.3673866, - "stddev": 1.0657642975455686, - "n": 5, - "samples": [ - 19.690185, - 19.814791, - 19.910969, - 22.247189, - 20.173799 - ] - }, - "insert_rss_peak_kb": 14540, - "insert_heap_allocated_kb": 2921, - "query_timestamp": "2026-09-08T16:56:21.951503596Z", - "query_throughput_items_per_sec": { - "mean": 297007.43855232355, - "stddev": 18479.763243343983, - "n": 5, - "samples": [ - 328955.5522997863, - 297134.15357341274, - 285265.7541159024, - 287442.1303809725, - 286239.6023915439 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 2.2815126050420167, - "aae_top1": 1.0, - "aae_top10": 0.8, - "aae_top100": 2.01, - "accuracy_runs": 1, - "are_all": 0.6369033391351014, - "are_top1": 0.0002805836139169473, - "are_top10": 0.001555601294898813, - "are_top100": 0.04553785988253641, - "l1_err": 2172.0, - "l2_err": 102.52804494381036, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.6369033391351014, - "relative_error_p99": 4.5 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 3.2204, - "stddev": 0.1875467941608172, - "n": 5, - "samples": [ - 2.899, - 3.209, - 3.343, - 3.317, - 3.334 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.2146085999999996, - "stddev": 0.1869482902310156, - "n": 5, - "samples": [ - 2.894008, - 3.20394, - 3.337239, - 3.311971, - 3.325885 - ] - }, - "query_rss_peak_kb": 14608, - "query_heap_allocated_kb": 1943, - "merge_timestamp": "2026-09-08T16:56:11.885502786Z", - "merge_folds_per_sec": { - "mean": 3157.4718914817513, - "stddev": 118.41487861947662, - "n": 5, - "samples": [ - 3239.7583140297734, - 3137.1072733832134, - 3150.648245876589, - 2976.0753304187633, - 3283.770293700415 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.3194, - "stddev": 0.011970797801316343, - "n": 5, - "samples": [ - 0.311, - 0.321, - 0.32, - 0.338, - 0.307 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.31707320000000005, - "stddev": 0.012142504239241588, - "n": 5, - "samples": [ - 0.308665, - 0.318765, - 0.317395, - 0.336013, - 0.304528 - ] - }, - "merge_rss_peak_kb": 14672, - "merge_heap_allocated_kb": 897, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 996000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:56:32.542482687Z", - "insert_throughput_items_per_sec": { - "mean": 1216934.8677931523, - "stddev": 17588.6736754695, - "n": 5, - "samples": [ - 1230601.5660389408, - 1192526.9108604025, - 1223835.1689841005, - 1204714.4814631788, - 1232996.21161914 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 15.669, - "stddev": 1.7911845242743694, - "n": 5, - "samples": [ - 16.255, - 16.772, - 12.492, - 16.604, - 16.222 - ] - }, - "sys_ms": { - "mean": 0.7711999999999999, - "stddev": 1.722778627682617, - "n": 5, - "samples": [ - 0.0, - 0.001, - 3.853, - 0.001, - 0.001 - ] - } - }, - "insert_wall_time_ms": { - "mean": 16.4374976, - "stddev": 0.2390789495141724, - "n": 5, - "samples": [ - 16.252214, - 16.77111, - 16.34207, - 16.601444, - 16.22065 - ] - }, - "insert_rss_peak_kb": 39244, - "insert_heap_allocated_kb": 24773, - "query_timestamp": "2026-09-08T16:56:42.616696562Z", - "query_throughput_items_per_sec": { - "mean": 316743.3788686749, - "stddev": 19624.004920500334, - "n": 5, - "samples": [ - 338155.9630713797, - 319552.5190607036, - 320086.71929268906, - 284482.18415380444, - 321439.5087647978 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 1.6515999999999995, - "stddev": 1.5933541037697805, - "n": 5, - "samples": [ - 0.0, - 1.938, - 2.977, - 3.343, - 0.0 - ] - }, - "sys_ms": { - "mean": 1.3668, - "stddev": 1.4575073584719906, - "n": 5, - "samples": [ - 2.818, - 1.043, - 0.0, - 0.005, - 2.968 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.0153474, - "stddev": 0.19718704585316957, - "n": 5, - "samples": [ - 2.815269, - 2.979166, - 2.974194, - 3.346431, - 2.961677 - ] - }, - "query_rss_peak_kb": 39316, - "query_heap_allocated_kb": 17699, - "merge_timestamp": "2026-09-08T16:56:32.542496954Z", - "merge_folds_per_sec": { - "mean": 378.6009481680373, - "stddev": 29.455851150626135, - "n": 5, - "samples": [ - 341.649772085437, - 396.486180870652, - 403.8883135724244, - 399.2232712035464, - 351.75720310812665 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.5328, - "stddev": 1.1057032603732342, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.157, - 2.507, - 0.0 - ] - }, - "sys_ms": { - "mean": 2.124, - "stddev": 1.2123172027155271, - "n": 5, - "samples": [ - 2.929, - 2.525, - 2.321, - 0.0, - 2.845 - ] - } - }, - "merge_wall_time_ms": { - "mean": 2.6545592, - "stddev": 0.21302448069928503, - "n": 5, - "samples": [ - 2.926974, - 2.522156, - 2.475932, - 2.504864, - 2.84287 - ] - }, - "merge_rss_peak_kb": 39380, - "merge_heap_allocated_kb": 7878, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 10240, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:57:29.368430923Z", - "insert_throughput_items_per_sec": { - "mean": 27980993.616275582, - "stddev": 1842098.5039640688, - "n": 5, - "samples": [ - 31242287.060381968, - 26710436.168067407, - 27310987.48337444, - 27351325.03494132, - 27289932.33461278 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7182, - "stddev": 0.04386000455996331, - "n": 5, - "samples": [ - 0.641, - 0.751, - 0.733, - 0.732, - 0.734 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7170664, - "stddev": 0.043596469791715914, - "n": 5, - "samples": [ - 0.640158, - 0.748771, - 0.732306, - 0.731226, - 0.732871 - ] - }, - "insert_rss_peak_kb": 11284, - "insert_heap_allocated_kb": 1111, - "query_timestamp": "2026-09-08T16:57:39.378928498Z", - "query_throughput_items_per_sec": { - "mean": 23618370.59076393, - "stddev": 534531.4768930095, - "n": 5, - "samples": [ - 23597706.302947354, - 22864459.48417779, - 24091741.351064853, - 23378687.98803011, - 24159257.827599537 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 9.229, - "aae_top1": 0.0, - "aae_top10": 5.7, - "aae_top100": 9.32, - "aae_top1000": 9.229, - "accuracy_runs": 1, - "are_all": 0.4857875000848293, - "are_top1": 0.0, - "are_top10": 0.17943548387096775, - "are_top100": 0.3330711319229116, - "are_top1000": 0.485787500084829, - "l1_err": 9229.0, - "l2_err": 467.7210707248499, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.4857875000848293, - "relative_error_p99": 2.3684210526315788 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.044399999999999995, - "stddev": 0.0011401754250991397, - "n": 5, - "samples": [ - 0.044, - 0.045, - 0.043, - 0.044, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0423574, - "stddev": 0.0009653956701788112, - "n": 5, - "samples": [ - 0.042377, - 0.043736, - 0.041508, - 0.042774, - 0.041392 - ] - }, - "query_rss_peak_kb": 11284, - "query_heap_allocated_kb": 793, - "merge_timestamp": "2026-09-08T16:57:29.368440582Z", - "merge_folds_per_sec": { - "mean": 407058.8305226917, - "stddev": 144887.41174209333, - "n": 5, - "samples": [ - 154607.29746444031, - 520833.3333333334, - 471475.71900047146, - 458085.2038479157, - 430292.59896729776 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.004, - "stddev": 0.0017320508075688774, - "n": 5, - "samples": [ - 0.007, - 0.003, - 0.004, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0030032, - "stddev": 0.0019423232738141195, - "n": 5, - "samples": [ - 0.006468, - 0.00192, - 0.002121, - 0.002183, - 0.002324 - ] - }, - "merge_rss_peak_kb": 11284, - "merge_heap_allocated_kb": 657, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 81920, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:57:49.454214745Z", - "insert_throughput_items_per_sec": { - "mean": 23866037.558692742, - "stddev": 1486734.5852393098, - "n": 5, - "samples": [ - 26506812.913589116, - 23146380.02189647, - 22952072.62953863, - 23301604.315457117, - 23423317.912982374 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.8417999999999999, - "stddev": 0.04838594837346897, - "n": 5, - "samples": [ - 0.756, - 0.866, - 0.872, - 0.86, - 0.855 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.840426, - "stddev": 0.04846758779328715, - "n": 5, - "samples": [ - 0.754523, - 0.864066, - 0.871381, - 0.85831, - 0.85385 - ] - }, - "insert_rss_peak_kb": 13852, - "insert_heap_allocated_kb": 2809, - "query_timestamp": "2026-09-08T16:57:59.464130508Z", - "query_throughput_items_per_sec": { - "mean": 6333722.406897154, - "stddev": 679420.7403474726, - "n": 5, - "samples": [ - 6643900.235194068, - 6530399.007379351, - 5123817.038741181, - 6668711.738266402, - 6701784.014904767 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1614, - "stddev": 0.01993238570768688, - "n": 5, - "samples": [ - 0.152, - 0.154, - 0.197, - 0.151, - 0.153 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.1595958, - "stddev": 0.019939546188416625, - "n": 5, - "samples": [ - 0.150514, - 0.15313, - 0.195167, - 0.149954, - 0.149214 - ] - }, - "query_rss_peak_kb": 13860, - "query_heap_allocated_kb": 1993, - "merge_timestamp": "2026-09-08T16:57:49.454232591Z", - "merge_folds_per_sec": { - "mean": 4539.646927302015, - "stddev": 485.3692799128041, - "n": 5, - "samples": [ - 3672.460585316768, - 4730.279464910787, - 4772.244625259491, - 4787.414843858464, - 4735.835117164561 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.224, - "stddev": 0.027973201461398728, - "n": 5, - "samples": [ - 0.274, - 0.213, - 0.211, - 0.21, - 0.212 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.2226566, - "stddev": 0.027770196835816635, - "n": 5, - "samples": [ - 0.272297, - 0.211404, - 0.209545, - 0.208881, - 0.211156 - ] - }, - "merge_rss_peak_kb": 13924, - "merge_heap_allocated_kb": 1130, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 655360, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:58:09.535935967Z", - "insert_throughput_items_per_sec": { - "mean": 22514485.921863537, - "stddev": 998470.0989676868, - "n": 5, - "samples": [ - 24191724.253050275, - 22348616.061950363, - 22309750.811238315, - 22215829.00032102, - 21506509.48275769 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.8907999999999999, - "stddev": 0.038596631977414905, - "n": 5, - "samples": [ - 0.827, - 0.896, - 0.897, - 0.902, - 0.932 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.0004472135954999579, - "n": 5, - "samples": [ - 0.001, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8896636000000001, - "stddev": 0.03798005779089853, - "n": 5, - "samples": [ - 0.826729, - 0.89491, - 0.896469, - 0.900259, - 0.929951 - ] - }, - "insert_rss_peak_kb": 29312, - "insert_heap_allocated_kb": 16782, - "query_timestamp": "2026-09-08T16:58:19.550894769Z", - "query_throughput_items_per_sec": { - "mean": 6299878.957075936, - "stddev": 82005.50949390283, - "n": 5, - "samples": [ - 6260760.682422915, - 6262721.1523406925, - 6443132.908945646, - 6241651.790729899, - 6291128.250940524 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1604, - "stddev": 0.0026076809620810583, - "n": 5, - "samples": [ - 0.161, - 0.161, - 0.156, - 0.161, - 0.163 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.1587544, - "stddev": 0.0020350172726539663, - "n": 5, - "samples": [ - 0.159725, - 0.159675, - 0.155204, - 0.160214, - 0.158954 - ] - }, - "query_rss_peak_kb": 29312, - "query_heap_allocated_kb": 12046, - "merge_timestamp": "2026-09-08T16:58:09.535948594Z", - "merge_folds_per_sec": { - "mean": 8993.467868920761, - "stddev": 243.54759379354093, - "n": 5, - "samples": [ - 8789.199831247362, - 8936.869950668477, - 8950.78856447253, - 8876.501238271923, - 9413.979759943515 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.113, - "stddev": 0.003000000000000003, - "n": 5, - "samples": [ - 0.116, - 0.114, - 0.113, - 0.114, - 0.108 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.1112552, - "stddev": 0.0029262140557382308, - "n": 5, - "samples": [ - 0.113776, - 0.111896, - 0.111722, - 0.112657, - 0.106225 - ] - }, - "merge_rss_peak_kb": 29312, - "merge_heap_allocated_kb": 5610, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 10240, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:58:29.666549460Z", - "insert_throughput_items_per_sec": { - "mean": 27922645.889863245, - "stddev": 1888179.5330403177, - "n": 5, - "samples": [ - 31277807.926109307, - 26874857.227320977, - 27302934.246343456, - 26857714.54278098, - 27299915.506761502 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7198, - "stddev": 0.04497999555357912, - "n": 5, - "samples": [ - 0.64, - 0.745, - 0.734, - 0.746, - 0.734 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7186822, - "stddev": 0.04469853239984509, - "n": 5, - "samples": [ - 0.639431, - 0.74419, - 0.732522, - 0.744665, - 0.732603 - ] - }, - "insert_rss_peak_kb": 11480, - "insert_heap_allocated_kb": 1123, - "query_timestamp": "2026-09-08T16:58:39.680354299Z", - "query_throughput_items_per_sec": { - "mean": 23507935.060018077, - "stddev": 132860.1428471702, - "n": 5, - "samples": [ - 23491092.1383803, - 23589464.033501003, - 23467350.309364755, - 23320187.149401072, - 23671581.669443272 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 1.694327731092437, - "aae_top1": 2.0, - "aae_top10": 1.8, - "aae_top100": 1.46, - "accuracy_runs": 1, - "are_all": 0.49153700428012315, - "are_top1": 0.0005611672278338945, - "are_top10": 0.003950663328809479, - "are_top100": 0.03129160657746158, - "l1_err": 1613.0, - "l2_err": 107.81001808737442, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.49153700428012315, - "relative_error_p99": 5.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0426, - "stddev": 0.001949358868961792, - "n": 5, - "samples": [ - 0.042, - 0.041, - 0.042, - 0.042, - 0.046 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.040498, - "stddev": 0.0002291353311909791, - "n": 5, - "samples": [ - 0.040526, - 0.040357, - 0.040567, - 0.040823, - 0.040217 - ] - }, - "query_rss_peak_kb": 11480, - "query_heap_allocated_kb": 805, - "merge_timestamp": "2026-09-08T16:58:29.666559855Z", - "merge_folds_per_sec": { - "mean": 435232.7310234324, - "stddev": 145910.6673992023, - "n": 5, - "samples": [ - 186811.13394358303, - 492368.29148202855, - 443066.0168365086, - 486381.3229571985, - 567536.8898978434 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0038, - "stddev": 0.0017888543819998318, - "n": 5, - "samples": [ - 0.007, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0026918000000000003, - "stddev": 0.00149803728258011, - "n": 5, - "samples": [ - 0.005353, - 0.002031, - 0.002257, - 0.002056, - 0.001762 - ] - }, - "merge_rss_peak_kb": 11480, - "merge_heap_allocated_kb": 669, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 81920, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:58:49.798211378Z", - "insert_throughput_items_per_sec": { - "mean": 23618218.139705643, - "stddev": 2653535.3827046547, - "n": 5, - "samples": [ - 27086287.431556337, - 23809353.74271136, - 23730872.91642936, - 23850637.766053863, - 19613938.8417773 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.4244, - "stddev": 0.4777324565067774, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.263, - 0.839, - 1.02 - ] - }, - "sys_ms": { - "mean": 0.4326, - "stddev": 0.4048361396911101, - "n": 5, - "samples": [ - 0.74, - 0.841, - 0.58, - 0.001, - 0.001 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8558812, - "stddev": 0.10168724905168784, - "n": 5, - "samples": [ - 0.738381, - 0.840006, - 0.842784, - 0.838552, - 1.019683 - ] - }, - "insert_rss_peak_kb": 14200, - "insert_heap_allocated_kb": 2821, - "query_timestamp": "2026-09-08T16:58:59.812679275Z", - "query_throughput_items_per_sec": { - "mean": 6740846.250834807, - "stddev": 136710.9851419851, - "n": 5, - "samples": [ - 6636366.171262861, - 6566921.203843581, - 6801846.215401323, - 6905406.091554659, - 6793691.57211161 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.1432, - "stddev": 0.0027748873851023087, - "n": 5, - "samples": [ - 0.145, - 0.146, - 0.142, - 0.139, - 0.144 - ] - }, - "sys_ms": { - "mean": 0.0002, - "stddev": 0.000447213595499958, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.001, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.14127520000000002, - "stddev": 0.0028749653389214904, - "n": 5, - "samples": [ - 0.143452, - 0.144969, - 0.139962, - 0.137863, - 0.14013 - ] - }, - "query_rss_peak_kb": 14208, - "query_heap_allocated_kb": 2005, - "merge_timestamp": "2026-09-08T16:58:49.798228851Z", - "merge_folds_per_sec": { - "mean": 4899.904983840585, - "stddev": 131.23951331790553, - "n": 5, - "samples": [ - 4687.419434978461, - 4891.07574319896, - 4919.613515162249, - 4962.261997508945, - 5039.154228354313 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.2056, - "stddev": 0.00568330889535312, - "n": 5, - "samples": [ - 0.215, - 0.206, - 0.204, - 0.203, - 0.2 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.20420520000000003, - "stddev": 0.005583532278047665, - "n": 5, - "samples": [ - 0.213337, - 0.204454, - 0.203268, - 0.201521, - 0.198446 - ] - }, - "merge_rss_peak_kb": 14272, - "merge_heap_allocated_kb": 1142, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 655360, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:59:10.266196678Z", - "insert_throughput_items_per_sec": { - "mean": 22930949.22290827, - "stddev": 1086404.7906464343, - "n": 5, - "samples": [ - 24777989.216619093, - 22519530.062446658, - 22801325.21302138, - 22645824.959095977, - 21910076.663358245 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.33940000000000003, - "stddev": 0.4656240973145613, - "n": 5, - "samples": [ - 0.808, - 0.889, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.5356000000000001, - "stddev": 0.4886637903507891, - "n": 5, - "samples": [ - 0.0, - 0.001, - 0.878, - 0.885, - 0.914 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.8736829999999999, - "stddev": 0.039580136356511024, - "n": 5, - "samples": [ - 0.807168, - 0.888118, - 0.877142, - 0.883165, - 0.912822 - ] - }, - "insert_rss_peak_kb": 29444, - "insert_heap_allocated_kb": 16794, - "query_timestamp": "2026-09-08T16:59:20.286100386Z", - "query_throughput_items_per_sec": { - "mean": 6524202.751988709, - "stddev": 98217.2134102652, - "n": 5, - "samples": [ - 6482629.00567911, - 6498337.872613465, - 6659624.62662031, - 6578356.378310773, - 6402065.876719884 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0304, - "stddev": 0.06797646651599361, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.152 - ] - }, - "sys_ms": { - "mean": 0.1172, - "stddev": 0.0655377753665777, - "n": 5, - "samples": [ - 0.148, - 0.148, - 0.144, - 0.146, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.1459446, - "stddev": 0.0021912476582988012, - "n": 5, - "samples": [ - 0.146854, - 0.146499, - 0.142951, - 0.144717, - 0.148702 - ] - }, - "query_rss_peak_kb": 29444, - "query_heap_allocated_kb": 12058, - "merge_timestamp": "2026-09-08T16:59:10.266215474Z", - "merge_folds_per_sec": { - "mean": 9372.60625346414, - "stddev": 306.91178929148936, - "n": 5, - "samples": [ - 9230.116022558404, - 9324.35708557895, - 9238.216654656986, - 9158.851113716297, - 9911.490390810066 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.1084, - "stddev": 0.0030495901363953833, - "n": 5, - "samples": [ - 0.11, - 0.109, - 0.11, - 0.11, - 0.103 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.106782, - "stddev": 0.003362997100801607, - "n": 5, - "samples": [ - 0.108341, - 0.107246, - 0.108246, - 0.109184, - 0.100893 - ] - }, - "merge_rss_peak_kb": 29444, - "merge_heap_allocated_kb": 5622, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - } -] diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json b/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json deleted file mode 100644 index 12a2a5de..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-uniform-are001.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": null, - "resources": { - "cpu_ns": 25873330.06, - "disk_bytes_per_state": 2498560.0, - "objective_cost": 25873330.06, - "peak_bytes_upper_bound": 9960000.0, - "retained_byte_seconds": 2988000000.0, - "retained_bytes": 9960000.0, - "serialized_bytes_per_state": 2490679.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 740414.2898437502, - "disk_bytes_per_state": 16384.0, - "objective_cost": 740414.2898437502, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13781.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 1008728.6131034482, - "disk_bytes_per_state": 143360.0, - "objective_cost": 1008728.6131034482, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136183.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": null, - "resources": { - "cpu_ns": 17058891.0175, - "disk_bytes_per_state": 258048.0, - "objective_cost": 17058891.0175, - "peak_bytes_upper_bound": 996000.0, - "retained_byte_seconds": 298800000.0, - "retained_bytes": 996000.0, - "serialized_bytes_per_state": 251754.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 742555.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 932753.6483333334, - "disk_bytes_per_state": 172032.0, - "objective_cost": 932753.6483333334, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164023.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - } - ], - "checked_formal_minimums": false, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json b/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json deleted file mode 100644 index cb0d2105..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-uniform-are005.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": null, - "resources": { - "cpu_ns": 25873330.06, - "disk_bytes_per_state": 2498560.0, - "objective_cost": 25873330.06, - "peak_bytes_upper_bound": 9960000.0, - "retained_byte_seconds": 2988000000.0, - "retained_bytes": 9960000.0, - "serialized_bytes_per_state": 2490679.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 740414.2898437502, - "disk_bytes_per_state": 16384.0, - "objective_cost": 740414.2898437502, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13781.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 1008728.6131034482, - "disk_bytes_per_state": 143360.0, - "objective_cost": 1008728.6131034482, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136183.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": null, - "resources": { - "cpu_ns": 17058891.0175, - "disk_bytes_per_state": 258048.0, - "objective_cost": 17058891.0175, - "peak_bytes_upper_bound": 996000.0, - "retained_byte_seconds": 298800000.0, - "retained_bytes": 996000.0, - "serialized_bytes_per_state": 251754.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 742555.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 932753.6483333334, - "disk_bytes_per_state": 172032.0, - "objective_cost": 932753.6483333334, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164023.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - } - ], - "checked_formal_minimums": false, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 703276.2264355469, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.05, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json deleted file mode 100644 index 0680fd97..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-uniform-memory-weighted.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 740414.2898437502, - "disk_bytes_per_state": 16384.0, - "objective_cost": 903614.2898437502, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13781.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 1008728.6131034482, - "disk_bytes_per_state": 143360.0, - "objective_cost": 2640728.6131034484, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136183.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 742555.74, - "disk_bytes_per_state": 24576.0, - "objective_cost": 988315.74, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20661.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 932753.6483333334, - "disk_bytes_per_state": 172032.0, - "objective_cost": 2898833.6483333334, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164023.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": -37138.06340820331, - "estimated_retained_bytes_savings": 242576.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-uniform-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 703276.2264355469, - "disk_bytes_per_state": null, - "objective_cost": 1594204.2264355468, - "peak_bytes_upper_bound": 628344.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 740414.2898437502, - "disk_bytes_per_state": 16384.0, - "objective_cost": 903614.2898437502, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13781.0 - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - } - ], - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json b/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json deleted file mode 100644 index 251f43ad..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-zipf-are001.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": null, - "resources": { - "cpu_ns": 23616342.411764707, - "disk_bytes_per_state": 2502656.0, - "objective_cost": 23616342.411764707, - "peak_bytes_upper_bound": 9960000.0, - "retained_byte_seconds": 2988000000.0, - "retained_bytes": 9960000.0, - "serialized_bytes_per_state": 2495217.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 726975.7380252101, - "disk_bytes_per_state": 16384.0, - "objective_cost": 726975.7380252101, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13933.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 830173.2125760649, - "disk_bytes_per_state": 143360.0, - "objective_cost": 830173.2125760649, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136338.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": null, - "resources": { - "cpu_ns": 16828510.76313025, - "disk_bytes_per_state": 262144.0, - "objective_cost": 16828510.76313025, - "peak_bytes_upper_bound": 996000.0, - "retained_byte_seconds": 298800000.0, - "retained_bytes": 996000.0, - "serialized_bytes_per_state": 254181.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 994498.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 1072070.2905462184, - "disk_bytes_per_state": 172032.0, - "objective_cost": 1072070.2905462184, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164178.0 - } - } - ], - "checked_formal_minimums": false, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json b/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json deleted file mode 100644 index 778e01b0..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-zipf-are005.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": null, - "resources": { - "cpu_ns": 23616342.411764707, - "disk_bytes_per_state": 2502656.0, - "objective_cost": 23616342.411764707, - "peak_bytes_upper_bound": 9960000.0, - "retained_byte_seconds": 2988000000.0, - "retained_bytes": 9960000.0, - "serialized_bytes_per_state": 2495217.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 726975.7380252101, - "disk_bytes_per_state": 16384.0, - "objective_cost": 726975.7380252101, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13933.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 830173.2125760649, - "disk_bytes_per_state": 143360.0, - "objective_cost": 830173.2125760649, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136338.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": null, - "resources": { - "cpu_ns": 16828510.76313025, - "disk_bytes_per_state": 262144.0, - "objective_cost": 16828510.76313025, - "peak_bytes_upper_bound": 996000.0, - "retained_byte_seconds": 298800000.0, - "retained_bytes": 996000.0, - "serialized_bytes_per_state": 254181.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 994498.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 1072070.2905462184, - "disk_bytes_per_state": 172032.0, - "objective_cost": 1072070.2905462184, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164178.0 - } - } - ], - "checked_formal_minimums": false, - "estimated_cpu_savings_ns": 0.0, - "estimated_retained_bytes_savings": 0.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 544554.9513926274, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.05, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": null, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json deleted file mode 100644 index 02c16204..00000000 --- a/tools/empirical-bench/results-sweep/recommendation-zipf-memory-weighted.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "accuracy_scope": "observed offline mean error on the exact declared probe population; not an unseen-data or realtime guarantee", - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v2-disjoint", - "model_version": "empirical-update-cpu-v1", - "recommendation": { - "assumptions": [ - "Fixed snapshot: construct, ingest all measured input, prepare exact index once, then read without updates or merges", - "Read CPU is the measured average over all distinct keys; individual key latency and error can differ", - "CPU sums disjoint measured construction/update/prepare/read phases while state remains alive; the comparison ends with retained state and excludes retirement", - "No serialization or disk-write CPU is modeled; reported disk/serialized bytes describe one optional persisted snapshot only", - "Offline mean-error acceptance is restricted to the measured input and probe population; it is not a formal or runtime error guarantee" - ], - "candidates": [ - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 1.6347221960194194, - "record_id": "cms-uniform-seed42-w272-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w30000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.006335943223443224, - "record_id": "cms-uniform-seed42-w2720-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w27200-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.3932923866316825, - "record_id": "countsketch-uniform-seed42-w300-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-uniform-seed42-w3000-d83", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "observed_error_mean": 2.3164860214890104, - "record_id": "cms-zipf-seed42-w272-d5", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w30000-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 726975.7380252101, - "disk_bytes_per_state": 16384.0, - "objective_cost": 890175.7380252101, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13933.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 27200 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w27200-d5", - "rejection": null, - "resources": { - "cpu_ns": 830173.2125760649, - "disk_bytes_per_state": 143360.0, - "objective_cost": 2462173.2125760647, - "peak_bytes_upper_bound": 544000.0, - "retained_byte_seconds": 163200000.0, - "retained_bytes": 544000.0, - "serialized_bytes_per_state": 136338.0 - } - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 300 - } - } - }, - "observed_error_mean": 0.6369033391351014, - "record_id": "countsketch-zipf-seed42-w300-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 3000 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "countsketch-zipf-seed42-w3000-d83", - "rejection": "configuration does not meet the deployment's formal minimum", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.4857875000848293, - "record_id": "cms-uniform-seed42-w512-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w4096-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-uniform-seed42-w32768-d5", - "rejection": "record belongs to another applicability context", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - }, - "observed_error_mean": 0.49153700428012315, - "record_id": "cms-zipf-seed42-w512-d5", - "rejection": "observed error exceeds explicit offline acceptance budget", - "resources": null - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 4096 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w4096-d5", - "rejection": null, - "resources": { - "cpu_ns": 994498.7560698125, - "disk_bytes_per_state": 24576.0, - "objective_cost": 1240258.7560698125, - "peak_bytes_upper_bound": 81920.0, - "retained_byte_seconds": 24576000.0, - "retained_bytes": 81920.0, - "serialized_bytes_per_state": 20818.0 - } - }, - { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 32768 - } - } - }, - "observed_error_mean": 0.0, - "record_id": "cms-zipf-seed42-w32768-d5", - "rejection": null, - "resources": { - "cpu_ns": 1072070.2905462184, - "disk_bytes_per_state": 172032.0, - "objective_cost": 3038150.2905462184, - "peak_bytes_upper_bound": 655360.0, - "retained_byte_seconds": 196608000.0, - "retained_bytes": 655360.0, - "serialized_bytes_per_state": 164178.0 - } - } - ], - "checked_formal_minimums": true, - "estimated_cpu_savings_ns": -182420.78663258266, - "estimated_retained_bytes_savings": 242576.0, - "exact_baseline": { - "configuration": null, - "observed_error_mean": 0.0, - "record_id": "exact-zipf-seed42-w272-d5", - "rejection": null, - "resources": { - "cpu_ns": 544554.9513926274, - "disk_bytes_per_state": null, - "objective_cost": 1435482.9513926273, - "peak_bytes_upper_bound": 626584.0, - "retained_byte_seconds": 89092800.0, - "retained_bytes": 296976.0, - "serialized_bytes_per_state": null - } - }, - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "selected": { - "configuration": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 2720 - } - } - }, - "observed_error_mean": 0.007412989350329503, - "record_id": "cms-zipf-seed42-w2720-d5", - "rejection": null, - "resources": { - "cpu_ns": 726975.7380252101, - "disk_bytes_per_state": 16384.0, - "objective_cost": 890175.7380252101, - "peak_bytes_upper_bound": 54400.0, - "retained_byte_seconds": 16320000.0, - "retained_bytes": 54400.0, - "serialized_bytes_per_state": 13933.0 - } - } - }, - "request": { - "accuracy": { - "max_observed_mean": 0.01, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "minimum_trials": 1 - }, - "context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "786f86a18e85df5f", - "implementation": "polars group_by + std HashMap", - "implementation_version": "polars 0.46.0", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 512 - } - } - } - ], - "query": { - "kind": "point_frequency", - "probe_set": "all_distinct_keys", - "value_type": "i64" - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "workload": { - "horizon_seconds": 300.0, - "input_items_per_state": 20000, - "merges_per_state": 0, - "reads_per_state": 1000, - "state_instances": 1 - } - }, - "schema_version": 1 -} \ No newline at end of file diff --git a/tools/empirical-bench/results-sweep/request-uniform-are001.json b/tools/empirical-bench/results-sweep/request-uniform-are001.json deleted file mode 100644 index f2df031b..00000000 --- a/tools/empirical-bench/results-sweep/request-uniform-are001.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "context": { - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.01, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "formal_minimums": null -} diff --git a/tools/empirical-bench/results-sweep/request-uniform-are005.json b/tools/empirical-bench/results-sweep/request-uniform-are005.json deleted file mode 100644 index 636fa287..00000000 --- a/tools/empirical-bench/results-sweep/request-uniform-are005.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "context": { - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.05, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "formal_minimums": null -} diff --git a/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json b/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json deleted file mode 100644 index 3e093c47..00000000 --- a/tools/empirical-bench/results-sweep/request-uniform-memory-weighted.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "context": { - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.01, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - } - } - ] -} diff --git a/tools/empirical-bench/results-sweep/request-zipf-are001.json b/tools/empirical-bench/results-sweep/request-zipf-are001.json deleted file mode 100644 index ff9d4933..00000000 --- a/tools/empirical-bench/results-sweep/request-zipf-are001.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "context": { - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.01, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "formal_minimums": null -} diff --git a/tools/empirical-bench/results-sweep/request-zipf-are005.json b/tools/empirical-bench/results-sweep/request-zipf-are005.json deleted file mode 100644 index ab88fe56..00000000 --- a/tools/empirical-bench/results-sweep/request-zipf-are005.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "context": { - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.05, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.0 - }, - "formal_minimums": null -} diff --git a/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json b/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json deleted file mode 100644 index 9d99238c..00000000 --- a/tools/empirical-bench/results-sweep/request-zipf-memory-weighted.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "context": { - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788886750 - }, - "exact_environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "polars 0.46.0", - "implementation": "polars group_by + std HashMap", - "id": "786f86a18e85df5f" - }, - "query": { - "kind": "point_frequency", - "value_type": "i64", - "probe_set": "all_distinct_keys" - }, - "accuracy": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "max_observed_mean": 0.01, - "minimum_trials": 1 - }, - "workload": { - "input_items_per_state": 20000, - "reads_per_state": 1000, - "merges_per_state": 0, - "state_instances": 1, - "horizon_seconds": 300.0 - }, - "weights": { - "cpu_ns_weight": 1.0, - "retained_byte_seconds_weight": 0.01 - }, - "formal_minimums": [ - { - "algorithm": "Cms", - "params": { - "Cms": { - "width": 512, - "depth": 5 - } - } - } - ] -} diff --git a/tools/empirical-bench/results-sweep/resource-probe.json b/tools/empirical-bench/results-sweep/resource-probe.json deleted file mode 100644 index 26c73c65..00000000 --- a/tools/empirical-bench/results-sweep/resource-probe.json +++ /dev/null @@ -1,1564 +0,0 @@ -[ - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 508.54296875, - 508.60546875, - 503.3671875, - 504.51953125, - 502.33984375 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 4096, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 1589.0, - 1589.0, - 1537.0, - 1506.0, - 1479.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 996.0, - 961.0, - 965.0, - 932.0, - 929.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 43.3892, - 41.8158, - 41.8477, - 40.3923, - 40.3668 - ], - "update_cpu_ns_samples": [ - 40.53965, - 40.3281, - 39.07075, - 38.25275, - 37.7252 - ] - }, - "serialized_bytes": 1669, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 2, - "build_cpu_ns_samples": [ - 5647288.0, - 5420600.5, - 5456400.5, - 5099760.0, - 4944713.5 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 2498560, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 908768.0, - 896133.0, - 902886.0, - 891512.0, - 904075.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 833.0, - 823.0, - 822.0, - 821.0, - 820.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 1383.136, - 1380.023, - 1381.4343, - 1382.0672, - 1381.7323 - ], - "update_cpu_ns_samples": [ - 959.1098, - 959.1922, - 958.6319, - 959.1734, - 958.36745 - ] - }, - "serialized_bytes": 2490679, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 4096, - "build_cpu_ns_samples": [ - 8.848876953125, - 8.85546875, - 8.822265625, - 8.852783203125, - 8.852783203125 - ], - "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded", - "impl": "polars", - "phases": { - "merge_cpu_ns_samples": [], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 637975.0, - 641239.0, - 629706.0, - 649544.0, - 645667.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 16.1009, - 16.3947, - 16.2567, - 16.2205, - 16.2141 - ], - "update_cpu_ns_samples": [ - 2.3841, - 2.3566, - 2.35455, - 2.25915, - 2.19655 - ] - }, - "sketch": "cms", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 13447.0234375, - 12114.15625, - 12433.76953125, - 4275.65625, - 3038.84375 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 16384, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 2550.0, - 2335.0, - 2542.0, - 2351.0, - 2522.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 823.0, - 822.0, - 822.0, - 821.0, - 822.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 36.6819, - 36.6599, - 36.6409, - 36.6867, - 36.6746 - ], - "update_cpu_ns_samples": [ - 34.65895, - 34.5671, - 34.94255, - 34.41895, - 35.08335 - ] - }, - "serialized_bytes": 13781, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 29, - "build_cpu_ns_samples": [ - 33303.206896551725, - 31832.344827586207, - 31106.44827586207, - 31304.58620689655, - 31182.379310344826 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 143360, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 36384.0, - 42448.0, - 35890.0, - 36848.0, - 36401.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 1031.0, - 1033.0, - 1026.0, - 1037.0, - 1027.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 50.5311, - 50.428, - 50.4055, - 50.5145, - 50.496 - ], - "update_cpu_ns_samples": [ - 46.66935, - 46.3713, - 46.18075, - 46.33685, - 46.0687 - ] - }, - "serialized_bytes": 136183, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 160, - "build_cpu_ns_samples": [ - 6222.75625, - 6166.58125, - 6062.09375, - 5991.53125, - 6013.6375 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 32768, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 8596.0, - 8864.0, - 8525.0, - 8458.0, - 8479.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 819.0, - 825.0, - 822.0, - 830.0, - 825.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 2103.3309, - 2105.7215, - 2106.0344, - 2102.8709, - 2106.2156 - ], - "update_cpu_ns_samples": [ - 757.76065, - 757.68055, - 758.34395, - 757.981, - 757.99515 - ] - }, - "serialized_bytes": 29755, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 16, - "build_cpu_ns_samples": [ - 52732.5, - 50534.25, - 50544.3125, - 50633.9375, - 50733.6875 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 258048, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 68226.0, - 68142.0, - 68548.0, - 67993.0, - 68545.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 822.0, - 822.0, - 823.0, - 830.0, - 819.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 1528.4238, - 1521.666, - 1515.5749, - 1520.3669, - 1509.1788 - ], - "update_cpu_ns_samples": [ - 775.3278, - 773.7087, - 774.62005, - 774.4485, - 774.09825 - ] - }, - "serialized_bytes": 251754, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 417.74609375, - 414.359375, - 411.8359375, - 411.73828125, - 411.36328125 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 4096, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 1049.0, - 1310.0, - 1057.0, - 1054.0, - 1053.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 818.0, - 821.0, - 822.0, - 824.0, - 822.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 35.64947478991596, - 35.66512605042017, - 35.65094537815126, - 36.25808823529412, - 35.674579831932775 - ], - "update_cpu_ns_samples": [ - 33.47005, - 33.65365, - 33.47725, - 33.2758, - 33.1709 - ] - }, - "serialized_bytes": 1722, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 2, - "build_cpu_ns_samples": [ - 5197745.5, - 5027666.0, - 4940209.5, - 4895955.0, - 4894921.0 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 2502656, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 917503.0, - 917380.0, - 902955.0, - 897014.0, - 897698.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 824.0, - 817.0, - 832.0, - 830.0, - 833.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 1388.6273109243698, - 1383.1633403361345, - 1383.381512605042, - 1381.8293067226891, - 1381.1705882352942 - ], - "update_cpu_ns_samples": [ - 832.8432, - 982.88025, - 832.57935, - 831.34725, - 830.7021 - ] - }, - "serialized_bytes": 2495217, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 4096, - "build_cpu_ns_samples": [ - 8.844970703125, - 8.85400390625, - 8.8388671875, - 8.817626953125, - 8.85107421875 - ], - "build_method": "process CPU around upstream PolarsFrequencyCore::::default(); output holder allocation and destruction excluded", - "impl": "polars", - "phases": { - "merge_cpu_ns_samples": [], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 477865.0, - 490589.0, - 483664.0, - 498328.0, - 474143.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 16.332773109243696, - 16.209768907563024, - 16.318802521008404, - 16.46344537815126, - 16.43876050420168 - ], - "update_cpu_ns_samples": [ - 2.2059, - 2.15235, - 2.1508, - 2.1614, - 2.14845 - ] - }, - "sketch": "cms", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 18798.375, - 11896.2578125, - 11965.53125, - 12035.4453125, - 12118.765625 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 16384, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 2550.0, - 2597.0, - 2546.0, - 2556.0, - 3060.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 815.0, - 827.0, - 822.0, - 819.0, - 821.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 36.89128151260504, - 37.29810924369748, - 36.93077731092437, - 36.986449579831934, - 36.9186974789916 - ], - "update_cpu_ns_samples": [ - 34.0155, - 33.94675, - 33.58855, - 33.84835, - 33.7528 - ] - }, - "serialized_bytes": 13933, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 2720, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 29, - "build_cpu_ns_samples": [ - 29816.068965517243, - 29051.655172413793, - 29082.206896551725, - 29451.103448275862, - 29141.793103448275 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 143360, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 32736.0, - 32339.0, - 32908.0, - 35918.0, - 32294.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 875.0, - 874.0, - 874.0, - 874.0, - 889.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 42.77100840336134, - 42.79705882352941, - 42.72153361344538, - 42.73487394957983, - 42.76376050420168 - ], - "update_cpu_ns_samples": [ - 37.80365, - 37.96745, - 37.71345, - 38.2411, - 37.8011 - ] - }, - "serialized_bytes": 136338, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 27200, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 160, - "build_cpu_ns_samples": [ - 5866.0, - 5774.475, - 5811.2875, - 5753.3, - 5741.4125 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 32768, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 8519.0, - 8507.0, - 8576.0, - 8615.0, - 8445.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 819.0, - 822.0, - 819.0, - 823.0, - 829.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 2097.363970588235, - 2103.9829831932775, - 2092.8003151260505, - 2103.7350840336135, - 2103.095168067227 - ], - "update_cpu_ns_samples": [ - 756.596, - 756.77665, - 756.93295, - 756.9757, - 756.9093 - ] - }, - "serialized_bytes": 29853, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 300, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 16, - "build_cpu_ns_samples": [ - 53888.4375, - 50796.875, - 51187.625, - 50844.6875, - 50833.3125 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 262144, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 68436.0, - 68030.0, - 67865.0, - 68061.0, - 69020.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 821.0, - 831.0, - 829.0, - 819.0, - 823.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 1514.8473739495798, - 1509.3008403361343, - 1507.2617647058823, - 1482.4311974789916, - 1490.7167016806723 - ], - "update_cpu_ns_samples": [ - 763.4282, - 764.272, - 763.44085, - 762.49765, - 765.38355 - ] - }, - "serialized_bytes": 254181, - "sketch": "countsketch-regularpath-vector2d", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 3000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 656.62109375, - 643.47265625, - 644.90625, - 678.234375, - 645.51953125 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 4096, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 1171.0, - 1198.0, - 1183.0, - 1191.0, - 1177.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 821.0, - 823.0, - 822.0, - 824.0, - 823.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 35.6478, - 35.6694, - 35.6529, - 35.6541, - 35.6493 - ], - "update_cpu_ns_samples": [ - 33.63535, - 33.61815, - 33.72835, - 33.5152, - 33.6219 - ] - }, - "serialized_bytes": 2759, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 195, - "build_cpu_ns_samples": [ - 5506.984615384616, - 4905.71282051282, - 4834.553846153846, - 4821.738461538462, - 4800.410256410257 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 24576, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 6332.0, - 6387.0, - 6329.0, - 6284.0, - 3933.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 828.0, - 822.0, - 821.0, - 822.0, - 828.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 37.4427, - 37.4461, - 37.4753, - 37.4304, - 37.4698 - ], - "update_cpu_ns_samples": [ - 34.783, - 35.34095, - 34.9518, - 34.5292, - 35.4273 - ] - }, - "serialized_bytes": 20661, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 24, - "build_cpu_ns_samples": [ - 36561.333333333336, - 35154.25, - 34808.875, - 35120.25, - 34991.833333333336 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 172032, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 44100.0, - 44294.0, - 36263.0, - 44547.0, - 44293.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 933.0, - 931.0, - 931.0, - 932.0, - 938.0 - ], - "query_distinct_keys": 1000, - "query_passes": 10, - "read_cpu_ns_samples": [ - 45.9499, - 45.9485, - 45.9521, - 45.9228, - 46.4604 - ], - "update_cpu_ns_samples": [ - 42.05545, - 43.03045, - 42.78075, - 42.0556, - 42.92265 - ] - }, - "serialized_bytes": 164023, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 256, - "build_cpu_ns_samples": [ - 742.98828125, - 741.7109375, - 737.2890625, - 738.0390625, - 735.29296875 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 4096, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 1489.0, - 2011.0, - 1495.0, - 2167.0, - 2063.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 994.0, - 996.0, - 995.0, - 990.0, - 998.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 43.57920168067227, - 43.60976890756302, - 43.579726890756305, - 43.61008403361345, - 43.634033613445375 - ], - "update_cpu_ns_samples": [ - 40.72625, - 40.62455, - 40.53815, - 40.6358, - 40.52295 - ] - }, - "serialized_bytes": 2913, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 512, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 195, - "build_cpu_ns_samples": [ - 5666.005128205128, - 5452.317948717949, - 5530.71282051282, - 5424.892307692307, - 5387.902564102564 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 24576, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 8670.0, - 8643.0, - 8638.0, - 8638.0, - 8646.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 1118.0, - 1115.0, - 1128.0, - 1110.0, - 1122.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 51.52142857142857, - 52.21050420168067, - 51.51953781512605, - 51.559768907563026, - 51.46271008403362 - ], - "update_cpu_ns_samples": [ - 46.56925, - 46.8706, - 47.1386, - 46.99205, - 46.7674 - ] - }, - "serialized_bytes": 20818, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 4096, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "build_batch": 24, - "build_cpu_ns_samples": [ - 37890.791666666664, - 37457.333333333336, - 37113.708333333336, - 37216.25, - 37070.041666666664 - ], - "build_method": "CLOCK_PROCESS_CPUTIME_ID around empty sketch constructors in batched live objects; holder allocation and all destruction excluded; jemalloc; five runs after two warmups", - "disk_bytes": 172032, - "disk_method": "actual flushed single MsgPack snapshot file allocated blocks*512 on local temporary filesystem; directory/inode overhead excluded; file removed after measurement; not runtime persistence demand", - "impl": "lib", - "phases": { - "merge_cpu_ns_samples": [ - 47727.0, - 47241.0, - 48761.0, - 47832.0, - 49361.0 - ], - "method": "CLOCK_PROCESS_CPUTIME_ID; live state with constructor/destructor excluded; five runs after two warmups; update per input item; read per all-distinct-key lookup across ten repeated fixed-snapshot probe passes; merge per binary merge; fixed rotated sorted key order", - "prepare_cpu_ns_samples": [ - 1106.0, - 1114.0, - 1117.0, - 1127.0, - 1123.0 - ], - "query_distinct_keys": 952, - "query_passes": 10, - "read_cpu_ns_samples": [ - 55.508823529411764, - 55.5110294117647, - 55.526785714285715, - 55.52153361344538, - 55.45115546218487 - ], - "update_cpu_ns_samples": [ - 48.9831, - 49.29785, - 48.762, - 48.62545, - 49.1358 - ] - }, - "serialized_bytes": 164178, - "sketch": "cms-regularpath-vector2d", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 32768, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - } -] diff --git a/tools/empirical-bench/results/MEASUREMENTS.md b/tools/empirical-bench/results/MEASUREMENTS.md deleted file mode 100644 index 68e2c345..00000000 --- a/tools/empirical-bench/results/MEASUREMENTS.md +++ /dev/null @@ -1,59 +0,0 @@ -# Offline frequency measurements, 2026-09-08 - -Audience: planner developers evaluating offline evidence integration. - -Actual ProjectASAP/sketch-bench revision -`87f619e843fd2e4da784160d4e205a0d0d55f032` was built in release mode using -`asap_sketchlib 0.2.2`, RegularPath/Vector2D, with Polars limited to one thread. -All inputs are synthetic: 20,000 i64 keys, key-space 1,000, seed 42. Uniform has -1,000 distinct keys; Zipf (exponent 1.1) has 952. No o11y trace distribution was -measured. Five timed repetitions follow two warmups; each distribution has one -offline accuracy trial. Raw samples and standard deviations are retained. - -| Distribution / implementation | Insert CPU ns/item | Read CPU ns/key | Retained requested heap B | Peak requested heap B | Mean absolute relative frequency error | -| --- | ---: | ---: | ---: | ---: | ---: | -| Uniform CMS (272 × 5) | 36.64 | 49.80 | 5,440 | 5,440 | 1.6347 | -| Uniform CountSketch (30,000 × 83) | 1,179.19 | 3,813.40 | 9,960,000 | 9,960,000 | 0 | -| Zipf CMS (272 × 5) | 35.68 | 44.33 | 5,440 | 5,440 | 2.3165 | -| Zipf CountSketch (30,000 × 83) | 948.19 | 3,911.34 | 9,960,000 | 9,960,000 | 0 | - -CMS is much cheaper at these formal sizing points, but average relative error -on individual low-frequency keys is high (163.47% / 231.65%). Its formal epsilon -parameter bounds additive error relative to stream mass; it does **not** promise -1% relative error per key. CountSketch's zero observed error is only for these -fixed offline inputs. None of these errors estimates PromQL count_over_time error. - -| Exact baseline | Insert CPU ns/item | Prepare CPU ns/dataset | Read CPU ns/key | Prepared state footprint B (upstream formula) | -| --- | ---: | ---: | ---: | ---: | -| Uniform Polars group-by + HashMap | 1.80 | 653,000 | 52.40 | 290,816 | -| Zipf Polars group-by + HashMap | 1.87 | 705,800 | 55.46 | 290,816 | - -The exact reference buffers input, groups/counts with Polars, and then serves -point-frequency reads from a HashMap. Its offline error is zero. Prepared state -footprint is taken from the query operation, because upstream flattening preserves -the first operation's memory and would otherwise omit the constructed index. -The exact footprint is formula based; do not label it measured peak heap. - -For an illustrative 1,000 point lookups after loading these 20,000 keys, adding -the measured insert/prepare/read components gives 0.783 ms CMS versus 0.741 ms -exact on uniform, and 0.758 ms CMS versus 0.799 ms exact on Zipf. CountSketch -gives 27.397 ms and 22.875 ms respectively. These are **partial CPU component -estimates**, excluding unmeasured empty-sketch construction. They are neither -complete cost estimates nor a demonstrated query-frequency break-even point. -They also show that a smaller sketch is not automatically faster than a prepared -exact index. CPU timings cover the upstream wrapper regions, including their -allocation/destruction overhead; they are not hardware instruction costs. - -The companion memory probe uses the identical upstream dataset generator and -release sketch libraries, but a counting System allocator. It measures requested -allocation bytes across construction and insertion while the sketch remains -alive, excludes the input dataset, and asserts every sketch allocation is released -after destruction. It does not measure allocator-resident pages or jemalloc -overhead. Process RSS remains in the raw reports. Disk usage and serialized -state size were not measured and remain null. - -Files `manifest.json`, `operation-reports.json`, `raw.json`, `memory-probe.json`, -`planner-evidence.json`, and `exact-baselines.json` preserve the evidence and -provenance. `context-uniform.json` and `context-zipf.json` explicitly select the -synthetic applicability contexts; they must not be represented as actual o11y -production distribution profiles. diff --git a/tools/empirical-bench/results/context-uniform.json b/tools/empirical-bench/results/context-uniform.json deleted file mode 100644 index 6ff26d0a..00000000 --- a/tools/empirical-bench/results/context-uniform.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788884981 -} diff --git a/tools/empirical-bench/results/context-zipf.json b/tools/empirical-bench/results/context-zipf.json deleted file mode 100644 index 7e87d609..00000000 --- a/tools/empirical-bench/results/context-zipf.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "now_unix_seconds": 1788884981 -} diff --git a/tools/empirical-bench/results/control-plane-uniform.json b/tools/empirical-bench/results/control-plane-uniform.json deleted file mode 100644 index c40c4ba3..00000000 --- a/tools/empirical-bench/results/control-plane-uniform.json +++ /dev/null @@ -1,1514 +0,0 @@ -{ - "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "estimated_end_to_end_savings": null, - "evaluation": "offline control-plane parser and typed summary binder", - "limitations": [ - "No deployed execution or measured end-to-end speedup", - "Binding does not establish executable placement or complete physical cost", - "Offline point-frequency errors do not establish current query guarantees", - "raw_subtrees includes necessary source scans beneath summaries" - ], - "offline_context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788884981 - }, - "rows": [ - { - "mode": "exact", - "planning_elapsed_ns": 27434443, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 6405157, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 5630308, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 14595871, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 13451043, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 4188644, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3678170, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3597895, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3597275, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7672146, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3657117, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3495810, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7709890, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 17076017, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7749242, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7688654, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 15125186, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9693543, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9575688, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3521263, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3730234, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3680909, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 4272290, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10536858, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10768134, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3657396, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3497834, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10835529, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3816630, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3809245, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 11147922, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9627400, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3888241, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3607890, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3597267, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3597007, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7629404, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3650613, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3484174, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7696159, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 17079269, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7725621, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7690073, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 15163332, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9692694, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9819254, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3521499, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3727545, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3692986, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 4277757, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10652378, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10765416, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3651311, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3496064, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10848084, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3816009, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3807853, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 11156018, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9632847, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3887231, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3606602, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3595247, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3596062, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7628702, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3641194, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3480084, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7708071, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 17116742, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7729489, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7686562, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 15150427, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9698577, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9604337, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3517647, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3725320, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3680353, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 4274444, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10585578, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10753797, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3648188, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3497024, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - } - ], - "schema_version": 1, - "reproduction": { - "command": [ - "cargo", - "run", - "--quiet", - "-p", - "control_plane", - "--example", - "offline_planner_replay", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-types.path=\"/mydata/asapplanner-empirical-o11y/crates/types\"", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-aware-mapping.path=\"/mydata/asapplanner-empirical-o11y/crates/asap-aware-mapping\"", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-frontend-promql.path=\"/mydata/asapplanner-empirical-o11y/crates/frontend-promql\"", - "--", - "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/planner-evidence.json", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/context-uniform.json" - ], - "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", - "planner_revision": "378a7547ede629a64e84c9f7c810226ce196cce9", - "backend_dirty": true, - "planner_dirty": true - } -} diff --git a/tools/empirical-bench/results/control-plane-zipf.json b/tools/empirical-bench/results/control-plane-zipf.json deleted file mode 100644 index 5d013cc1..00000000 --- a/tools/empirical-bench/results/control-plane-zipf.json +++ /dev/null @@ -1,1514 +0,0 @@ -{ - "corpus_path": "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "estimated_end_to_end_savings": null, - "evaluation": "offline control-plane parser and typed summary binder", - "limitations": [ - "No deployed execution or measured end-to-end speedup", - "Binding does not establish executable placement or complete physical cost", - "Offline point-frequency errors do not establish current query guarantees", - "raw_subtrees includes necessary source scans beneath summaries" - ], - "offline_context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788884981 - }, - "rows": [ - { - "mode": "exact", - "planning_elapsed_ns": 13618375, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3913658, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3825015, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 11291391, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9768080, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3929460, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3617283, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3600486, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3599199, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7616848, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3658985, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3493575, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7694876, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 17086430, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7744155, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 7689656, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 15144628, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9690126, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 9581458, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3518909, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3728937, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3683514, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 4276098, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10570285, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 10769067, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3661493, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "exact", - "planning_elapsed_ns": 3506212, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10851425, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3817582, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3808790, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 11145207, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9633223, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3887339, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3611686, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3601361, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3601327, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7638604, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3651510, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3490318, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7697119, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 17097214, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7758420, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 7687412, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 15156651, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9691912, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 9619212, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3519362, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3731478, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3682788, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 4276094, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10587359, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 10761262, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3651028, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "default", - "planning_elapsed_ns": 3505688, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10875564, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3813251, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3806064, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": true, - "states": [], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.99,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Increase,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 11149403, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"max\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: true,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9624198, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: BinaryOp {\n op: Arithmetic(\n Div,\n ),\n lhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n rhs: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n vector_match: None,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3889748, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 43200s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n HistogramQuantile {\n q: 0.95,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [\n 3,\n ],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Aggregate {\n reduction: PerEntity,\n measures: [\n Rate,\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_request_duration_seconds_bucket\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"le\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"histogram_quantile\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3609383, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 43200s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_cache_refresh_lag_seconds\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"user-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3597467, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3590531, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7633998, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"service_retry_queue_depth\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3650290, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(MinMax, MinMax)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n PromqlSubquery {\n range: 21600s,\n resolution: Some(\n 60s,\n ),\n child: Aggregate {\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n measures: [\n Sum {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n MinMax,\n MinMax,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n MinMax,\n MinMax,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(MinMax)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactExtremum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3485280, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7714510, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 17101498, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "result": { - "reason": "L3->L4 implementation failed: ASAPPlanner produced no legal summary candidate for the target", - "status": "rejected" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7731176, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [\n 2,\n ],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 7686433, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Aggregate {\n reduction: PerEntity,\n measures: [\n Avg {\n col: None,\n },\n ],\n output_names: [\n \"\",\n ],\n having: None,\n child: TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \".+\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 15131031, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 86400s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9698399, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 21600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 9609415, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3521210, - "query": "sum(process_resident_memory_bytes)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"process_resident_memory_bytes\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3729320, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: TimeShift {\n shift: TimeShift {\n offset_ms: 3600000,\n at: None,\n },\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3683603, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Eq,\n right: Literal(\n Utf8(\n \"order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 4279041, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 300s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10764536, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 21600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"payment-service|order-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 10855317, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "result": { - "raw_subtrees": 2, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - }, - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Rate, Rate)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: BinaryOp {\n lhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n Predicate(\n Compare {\n left: Column(\n 3,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"5..\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n Column {\n name: \"status\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n SummaryField {\n name: \"status\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n rhs: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"http_requests_total\",\n },\n predicates: [\n Predicate(\n Compare {\n left: Column(\n 2,\n ),\n op: Regex,\n right: Literal(\n Utf8(\n \"user-service|order-service|payment-service\",\n ),\n ),\n },\n ),\n ],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n Column {\n name: \"job\",\n dtype: Utf8,\n nullable: true,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Rate,\n Rate,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Rate,\n Rate,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"job\",\n dtype: Plain(\n Utf8,\n ),\n nullable: true,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Rate)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n operator: BinaryOperator {\n kind: Arithmetic(\n Div,\n ),\n vector_match: None,\n },\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"BinaryOp over exact operands\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3650361, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - }, - { - "exact_family": "ExactAggregate(Increase, Increase)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n TimeRange {\n range: 3600s,\n child: Scan {\n source: TimeSeries {\n metric: \"process_cpu_seconds_total\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Increase,\n Increase,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: PerEntity,\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: ExactAggregate(\n Increase,\n Increase,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Increase)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: Lipschitz {\n constant: inf,\n },\n rule: \"exact_input\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - }, - { - "mode": "empirical", - "planning_elapsed_ns": 3500505, - "query": "sum(up)", - "result": { - "raw_subtrees": 1, - "root_raw_fallback": false, - "states": [ - { - "exact_family": "ExactAggregate(Sum, Sum)" - } - ], - "status": "bound", - "summary_plan": "SummaryNode {\n expr: SummaryAgg {\n child: SummaryNode {\n expr: KeepPreAsap(\n Scan {\n source: TimeSeries {\n metric: \"up\",\n },\n predicates: [],\n schema: Schema {\n columns: [\n Column {\n name: \"ts\",\n dtype: Timestamp,\n nullable: false,\n table: None,\n },\n Column {\n name: \"value\",\n dtype: Float64,\n nullable: false,\n table: None,\n },\n ],\n time_index: Some(\n 0,\n ),\n unique_keys: [],\n closed: false,\n },\n },\n ),\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"ts\",\n dtype: Plain(\n Timestamp,\n ),\n nullable: false,\n },\n SummaryField {\n name: \"value\",\n dtype: Plain(\n Float64,\n ),\n nullable: false,\n },\n ],\n time_index: Some(\n 0,\n ),\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n ),\n },\n family: ExactAggregate(\n Sum,\n Sum,\n ),\n input: SummaryUpdate {\n item: None,\n weight: Column(\n SampleValue,\n ),\n },\n reduction: Reduce(\n GroupKeys {\n keys: [],\n without: false,\n },\n ),\n grouping: PerSubpopulationInstance,\n },\n schema: SummarySchema {\n fields: [\n SummaryField {\n name: \"sum\",\n dtype: ExactAggregate(\n Sum,\n Sum,\n ),\n nullable: false,\n },\n ],\n time_index: None,\n },\n guarantee: Some(\n ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"ExactAggregate(Sum)\",\n },\n ChildGuarantee {\n input_index: 0,\n guarantee: ResultGuarantee {\n metric: AbsoluteValue,\n bound: Zero,\n failure_probability: Zero,\n provenance: [\n Exact {\n reason: \"KeepPreAsap\",\n },\n ],\n },\n },\n CompositionStep {\n operator: ExactSum,\n rule: \"exact_input\",\n },\n ],\n },\n ),\n}" - } - } - ], - "schema_version": 1, - "reproduction": { - "command": [ - "cargo", - "run", - "--quiet", - "-p", - "control_plane", - "--example", - "offline_planner_replay", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-types.path=\"/mydata/asapplanner-empirical-o11y/crates/types\"", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-aware-mapping.path=\"/mydata/asapplanner-empirical-o11y/crates/asap-aware-mapping\"", - "--config", - "patch.\"https://github.com/ProjectASAP/ASAPPlanner\".asap-frontend-promql.path=\"/mydata/asapplanner-empirical-o11y/crates/frontend-promql\"", - "--", - "/mydata/asapplanner-empirical-o11y/crates/frontend-promql/tests/observability/data/o11y_bench_promql.txt", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/planner-evidence.json", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/results/context-zipf.json" - ], - "backend_revision": "95131d83972bb7a07d338e2a5af925a20c15ddce", - "planner_revision": "378a7547ede629a64e84c9f7c810226ce196cce9", - "backend_dirty": true, - "planner_dirty": true - } -} diff --git a/tools/empirical-bench/results/exact-baselines.json b/tools/empirical-bench/results/exact-baselines.json deleted file mode 100644 index 3ead02ae..00000000 --- a/tools/empirical-bench/results/exact-baselines.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "implementation": "polars exact group_by + HashMap", - "insert_cpu_ns_per_item": { - "value": 1.8, - "stddev": 0.25248762345905185, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "prepare_cpu_ns_per_dataset": { - "value": 653000.0, - "stddev": 14713.938969562161, - "samples": 5 - }, - "read_cpu_ns_per_key": { - "value": 52.400000000000006, - "stddev": 2.701851217221263, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": 290816, - "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - { - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "implementation": "polars exact group_by + HashMap", - "insert_cpu_ns_per_item": { - "value": 1.87, - "stddev": 0.3053686296920494, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "prepare_cpu_ns_per_dataset": { - "value": 705800.0, - "stddev": 8927.485648266258, - "samples": 5 - }, - "read_cpu_ns_per_key": { - "value": 55.462184873949575, - "stddev": 0.8788445656870514, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": 290816, - "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } -] diff --git a/tools/empirical-bench/results/manifest.json b/tools/empirical-bench/results/manifest.json deleted file mode 100644 index c7d638c2..00000000 --- a/tools/empirical-bench/results/manifest.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "source_dirty": false, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2" - }, - "binary_sha256": "1c2aebd6649ecf9dd2a77dbc6c6c4bd89d07c061f387389e12698dfe41dbc6d4", - "invocations": [ - { - "id": "cms-uniform-seed42", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ] - }, - { - "id": "countsketch-uniform-seed42", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ] - }, - { - "id": "exact-uniform-seed42", - "distribution_id": "uniform-n20000-c1000-seed42", - "distribution": "uniform", - "algorithm": "Exact", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query", - "--metrics", - "throughput,cpu,memory" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy" - ], - "prepare_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "uniform", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "prepare", - "--metrics", - "cpu,memory" - ] - }, - { - "id": "cms-zipf-seed42", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Cms", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "countsketch-zipf-seed42", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "CountSketch", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query,merge", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "countsketch-regularpath-vector2d", - "--library", - "lib", - "--config", - "rows=83 cols=30000", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": null - }, - { - "id": "exact-zipf-seed42", - "distribution_id": "zipf-n20000-c1000-seed42", - "distribution": "zipf", - "algorithm": "Exact", - "argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "insert,query", - "--metrics", - "throughput,cpu,memory", - "--zipf-s", - "1.1" - ], - "accuracy_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "query", - "--metrics", - "accuracy", - "--zipf-s", - "1.1" - ], - "prepare_argv": [ - "/mydata/sketch-bench-empirical-322/target/release/approxbench", - "sketchbench", - "--variant", - "cms", - "--library", - "polars", - "--config", - "rows=5 cols=272", - "--dataset", - "zipf", - "--size", - "20000", - "--cardinality", - "1000", - "--dtype", - "i64", - "--seed", - "42", - "--runs", - "5", - "--warmup-runs", - "2", - "--operations", - "prepare", - "--metrics", - "cpu,memory", - "--zipf-s", - "1.1" - ] - } - ], - "memory_probe": { - "source_sha256": "e2bf16003e7c87043142eba31f5b7ea6c055e7cefb9ce4f3545bfa6a077ddba5", - "compile_argv": [ - "rustc", - "--edition=2021", - "-C", - "opt-level=3", - "-C", - "panic=abort", - "-C", - "target-cpu=native", - "-L", - "dependency=/mydata/sketch-bench-empirical-322/target/release/deps", - "/mydata/asapplanner-empirical-o11y/tools/empirical-bench/memory_probe.rs", - "-o", - "/tmp/asap-memory-probe-nywrmqf_/memory-probe", - "--extern", - "asap_sketchlib=/mydata/sketch-bench-empirical-322/target/release/deps/libasap_sketchlib-f255d9976ae9937f.rlib", - "--extern", - "aqpbm_datagen=/mydata/sketch-bench-empirical-322/target/release/deps/libaqpbm_datagen-487a28a02dcfc664.rlib", - "--extern", - "serde_json=/mydata/sketch-bench-empirical-322/target/release/deps/libserde_json-0600b37540dd817c.rlib" - ], - "allocator": "System + requested-byte tracking; CPU evidence still from uninstrumented jemalloc bench" - }, - "runtime_provenance": { - "runtime_field_status": "declared build preconditions, not introspected from the executable", - "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", - "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", - "declared_settings": "release; repository target-cpu=native; default jemalloc", - "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", - "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings" - } -} diff --git a/tools/empirical-bench/results/memory-probe.json b/tools/empirical-bench/results/memory-probe.json deleted file mode 100644 index 2517a8e2..00000000 --- a/tools/empirical-bench/results/memory-probe.json +++ /dev/null @@ -1,198 +0,0 @@ -[ - { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ] - ], - "sketch": "cms-regularpath-vector2d", - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ], - [ - 5440, - 5440 - ] - ], - "sketch": "cms-regularpath-vector2d", - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - }, - { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": [ - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ], - [ - 9960000, - 9960000 - ] - ], - "sketch": "countsketch-regularpath-vector2d", - "workload": { - "synthetic": { - "description": { - "column_label": [ - "key" - ], - "column_num": 1, - "column_spec": [ - { - "data_type": "i64", - "distribution": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "special_rule": 0 - } - ], - "row_num": 20000 - } - } - } - } -] diff --git a/tools/empirical-bench/results/o11y-exact-snapshot.json b/tools/empirical-bench/results/o11y-exact-snapshot.json deleted file mode 100644 index 82377f42..00000000 --- a/tools/empirical-bench/results/o11y-exact-snapshot.json +++ /dev/null @@ -1,1888 +0,0 @@ -{ - "arch": "x86_64", - "build_profile": "release", - "clock": "CLOCK_PROCESS_CPUTIME_ID", - "command_arguments": [ - "300", - "60" - ], - "cpu": "model name\t: Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "data": "synthetic deterministic finite gauges; three jobs; non-stale finite float samples on (T-window,T] every60s", - "implementation": "o11y_exact_bench Rust reference kernels; not production data-plane runtime", - "os": "linux", - "rows": [ - { - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.9824839157255253, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 1728000, - "kernel": "MaxWindow", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "range_seconds": 43200, - "raw_cpu_ns": 9853524.96, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 164225.41600000003, - "samples_cpu_ns": [ - 186697.68, - 173569.36, - 164596.08, - 154922.28, - 141341.68 - ], - "stddev_cpu_ns": 17339.716284543985 - }, - "retained_value_bytes": 800, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 720, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "selected_series": 100, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 172595.17360000004, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 139.49596, - "samples_cpu_ns": [ - 141.2754, - 137.058, - 146.2487, - 137.3208, - 135.5769 - ], - "stddev_cpu_ns": 4.324346930231208 - } - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.9815750969610489, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 864000, - "kernel": "MaxWindow", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "range_seconds": 21600, - "raw_cpu_ns": 3878217.12, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 64636.952000000005, - "samples_cpu_ns": [ - 66078.6, - 65944.4, - 64936.36, - 63269.76, - 62955.64 - ], - "stddev_cpu_ns": 1464.0217198935266 - }, - "retained_value_bytes": 800, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 360, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "selected_series": 100, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 71455.77440000001, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 113.64704000000002, - "samples_cpu_ns": [ - 115.1532, - 115.1529, - 115.5931, - 111.8675, - 110.4685 - ], - "stddev_cpu_ns": 2.3234220963914396 - } - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.9814922372731635, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 864000, - "kernel": "MaxWindow", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "range_seconds": 21600, - "raw_cpu_ns": 3272973.5999999996, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 54549.56, - "samples_cpu_ns": [ - 56317.4, - 54367.08, - 54533.08, - 54425.68, - 53104.56 - ], - "stddev_cpu_ns": 1146.9742870701168 - }, - "retained_value_bytes": 800, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 360, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "selected_series": 100, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 60575.4188, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 100.43098, - "samples_cpu_ns": [ - 102.5627, - 103.9565, - 99.5733, - 97.2646, - 98.7978 - ], - "stddev_cpu_ns": 2.756917464669557 - } - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.9821747684578059, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 864000, - "kernel": "MaxWindow", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "range_seconds": 21600, - "raw_cpu_ns": 8134862.880000001, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 135581.048, - "samples_cpu_ns": [ - 141600.36, - 137506.4, - 133386.4, - 132743.76, - 132668.32 - ], - "stddev_cpu_ns": 3914.3889918504437 - }, - "retained_value_bytes": 2400, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 360, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "selected_series": 300, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 145005.8144, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 157.07944, - "samples_cpu_ns": [ - 155.825, - 157.0564, - 156.6706, - 157.1387, - 158.7065 - ], - "stddev_cpu_ns": 1.047871257836577 - } - }, - { - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.9827627106185279, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 864000, - "kernel": "SumAverageWindow", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "range_seconds": 21600, - "raw_cpu_ns": 8558658.24, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 142644.304, - "samples_cpu_ns": [ - 142854.44, - 142844.92, - 142754.04, - 142416.32, - 142351.8 - ], - "stddev_cpu_ns": 241.85801719191133 - }, - "retained_value_bytes": 8, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 360, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "selected_series": 300, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 147528.0688, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 81.39608000000001, - "samples_cpu_ns": [ - 81.4132, - 81.261, - 81.2814, - 81.6113, - 81.4135 - ], - "stddev_cpu_ns": 0.13992346836753305 - } - }, - { - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.8095244674137372, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 2400, - "kernel": "SumInstant", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "sum(process_resident_memory_bytes)", - "range_seconds": 0, - "raw_cpu_ns": 28141.92, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 469.032, - "samples_cpu_ns": [ - 484.4, - 465.92, - 465.28, - 465.4, - 464.16 - ], - "stddev_cpu_ns": 8.61488943631895 - }, - "retained_value_bytes": 8, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 1, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "selected_series": 300, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 5360.3472, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 81.52192, - "samples_cpu_ns": [ - 81.8304, - 81.299, - 81.7548, - 81.2867, - 81.4387 - ], - "stddev_cpu_ns": 0.2556072905845993 - } - }, - { - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "reason": "no complete reference kernel for this query; no borrowed costs", - "status": "unavailable" - }, - { - "accepted_measured_candidates": 1, - "comparison_scope": "same immutable metric snapshot and fixed evaluation time; retained whole-query exact result reference implementation including filtering, reduction, allocation and readout", - "estimated_cpu_reduction_fraction": 0.8124295279253828, - "evaluations": 60, - "exclusions": [ - "disk/network storage and protocol serialization", - "label output materialization shared by both paths", - "live updates, eviction, sliding windows, staleness and exceptional samples" - ], - "input_series": 300, - "input_value_bytes": 2400, - "kernel": "SumInstant", - "output_equality_verified": true, - "planner_candidate_count": 1, - "profile_model_version": "fixed-snapshot-exact-values-v1", - "query": "sum(up)", - "range_seconds": 0, - "raw_cpu_ns": 28544.640000000003, - "raw_per_evaluation": { - "iterations_per_sample": 25, - "mean_cpu_ns": 475.744, - "samples_cpu_ns": [ - 489.12, - 472.72, - 472.72, - 471.88, - 472.28 - ], - "stddev_cpu_ns": 7.485591492995059 - }, - "retained_value_bytes": 8, - "retained_value_bytes_method": "exact Vec length times sizeof(f64), logical values only; label/input storage remains shared", - "sample_interval_seconds": 60, - "samples_per_series": 1, - "selected": "retained_exact_summary", - "selected_planner_graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "selected_series": 300, - "status": "profiled_fixed_snapshot", - "summary_cpu_ns": 5354.1316, - "summary_read_per_evaluation": { - "iterations_per_sample": 10000, - "mean_cpu_ns": 81.30646, - "samples_cpu_ns": [ - 81.2769, - 81.2786, - 81.6576, - 81.0842, - 81.235 - ], - "stddev_cpu_ns": 0.2118108306956964 - } - } - ], - "schema_version": 1, - "source_file": "crates/devtools/src/bin/o11y_exact_bench.rs", - "source_revision": "bc7cf2a5c48f3bf34c3d69139d45370a9f23aafe", - "timing_environment": "shared development host; no exclusive core reservation or CPU affinity" -} \ No newline at end of file diff --git a/tools/empirical-bench/results/operation-reports.json b/tools/empirical-bench/results/operation-reports.json deleted file mode 100644 index 2fd5ae38..00000000 --- a/tools/empirical-bench/results/operation-reports.json +++ /dev/null @@ -1,2215 +0,0 @@ -[ - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 27462414.421672627, - "stddev": 2121229.9002417843, - "n": 5, - "samples": [ - 31031952.049427696, - 26920835.24583434, - 25374495.84048577, - 27277277.618584555, - 26707511.354030766 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7328, - "stddev": 0.05344810567269899, - "n": 5, - "samples": [ - 0.645, - 0.745, - 0.79, - 0.734, - 0.75 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7315346, - "stddev": 0.052957671689756146, - "n": 5, - "samples": [ - 0.644497, - 0.742919, - 0.788193, - 0.733211, - 0.748853 - ] - }, - "rss_peak_kb": 11636, - "heap_allocated_kb": 1051, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:27.004798255Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 21136707.885741428, - "stddev": 1286805.8474790915, - "n": 5, - "samples": [ - 22205444.775058843, - 20005601.568439163, - 21994457.396736022, - 19484062.03725353, - 21993973.65121957 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.049800000000000004, - "stddev": 0.0031144823004794846, - "n": 5, - "samples": [ - 0.046, - 0.052, - 0.047, - 0.053, - 0.051 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.047455399999999995, - "stddev": 0.002964145205619997, - "n": 5, - "samples": [ - 0.045034, - 0.049986, - 0.045466, - 0.051324, - 0.045467 - ] - }, - "rss_peak_kb": 11636, - "heap_allocated_kb": 733, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:27.004806892Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.011600000000000001, - "stddev": 0.007924645102463582, - "n": 5, - "samples": [ - 0.019, - 0.016, - 0.017, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0106172, - "stddev": 0.00819797570745364, - "n": 5, - "samples": [ - 0.017742, - 0.015598, - 0.016393, - 0.001567, - 0.001786 - ] - }, - "rss_peak_kb": 11636, - "heap_allocated_kb": 637, - "memory_bytes": 5440, - "merge_folds_per_sec": { - "mean": 275909.67387786397, - "stddev": 296280.2804938654, - "n": 5, - "samples": [ - 56363.43140570398, - 64110.78343377357, - 61001.6470444702, - 638162.0931716656, - 559910.4143337066 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:27.004813199Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.036823, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.036823 - ] - }, - "memory_bytes": 5440, - "accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.0794538568545333, - "are_top1000": 1.6347221960194203, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:37.016887019Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 848776.7177355861, - "stddev": 25678.34947988661, - "n": 5, - "samples": [ - 809565.9281549908, - 837084.7635798482, - 862354.5833025042, - 873857.5295890344, - 861020.7840515531 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 22.788200000000003, - "stddev": 2.090169060148008, - "n": 5, - "samples": [ - 24.698, - 23.895, - 23.195, - 22.89, - 19.263 - ] - }, - "sys_ms": { - "mean": 0.7956, - "stddev": 1.7734307993265483, - "n": 5, - "samples": [ - 0.01, - 0.0, - 0.0, - 0.0, - 3.968 - ] - } - }, - "wall_time_ms": { - "mean": 23.580925, - "stddev": 0.7274234664406292, - "n": 5, - "samples": [ - 24.704597, - 23.892443, - 23.192316, - 22.887026, - 23.228243 - ] - }, - "rss_peak_kb": 282480, - "heap_allocated_kb": 243573, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:47.716913903Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 262769.15824652876, - "stddev": 10337.665821738738, - "n": 5, - "samples": [ - 271225.35002309486, - 264678.5426164215, - 250768.41712216657, - 273759.29549687856, - 253414.18597408233 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 3.8133999999999997, - "stddev": 0.15151831572453558, - "n": 5, - "samples": [ - 3.69, - 3.78, - 3.99, - 3.655, - 3.952 - ] - } - }, - "wall_time_ms": { - "mean": 3.8103670000000003, - "stddev": 0.15080200586033313, - "n": 5, - "samples": [ - 3.686971, - 3.778168, - 3.987743, - 3.652844, - 3.946109 - ] - }, - "rss_peak_kb": 282480, - "heap_allocated_kb": 175245, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:47.716918767Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.9907999999999999, - "stddev": 1.4396316195471675, - "n": 5, - "samples": [ - 3.158, - 0.0, - 0.0, - 0.0, - 1.796 - ] - }, - "sys_ms": { - "mean": 2.331, - "stddev": 1.501450964900286, - "n": 5, - "samples": [ - 0.0, - 3.324, - 3.358, - 3.351, - 1.622 - ] - } - }, - "wall_time_ms": { - "mean": 3.3203256, - "stddev": 0.0979774039526462, - "n": 5, - "samples": [ - 3.156568, - 3.321947, - 3.356612, - 3.349021, - 3.41748 - ] - }, - "rss_peak_kb": 282480, - "heap_allocated_kb": 77909, - "memory_bytes": 9960000, - "merge_folds_per_sec": { - "mean": 301.39109825961305, - "stddev": 9.144410218672732, - "n": 5, - "samples": [ - 316.7997648078546, - 301.0282825102267, - 297.9194497308596, - 298.5947236520762, - 292.6132705970481 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:47.716927415Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 13.171889, - "stddev": 0.0, - "n": 1, - "samples": [ - 13.171889 - ] - }, - "memory_bytes": 9960000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:27:57.855957080Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 582378449.9780885, - "stddev": 76256068.40887626, - "n": 5, - "samples": [ - 685518423.3076264, - 470278404.8156509, - 582360306.3215212, - 589640024.764881, - 584095090.6807629 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.036000000000000004, - "stddev": 0.005049752469181039, - "n": 5, - "samples": [ - 0.03, - 0.044, - 0.036, - 0.035, - 0.035 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0348412, - "stddev": 0.004812785388940589, - "n": 5, - "samples": [ - 0.029175, - 0.042528, - 0.034343, - 0.033919, - 0.034241 - ] - }, - "rss_peak_kb": 19412, - "heap_allocated_kb": 3248, - "memory_bytes": 262144 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:00.917715465Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 19766077.209879298, - "stddev": 1504687.1387838016, - "n": 5, - "samples": [ - 18675880.10084975, - 19261513.56973631, - 18904306.400998145, - 19606305.38781272, - 22382380.589999553 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0524, - "stddev": 0.0027018512172212595, - "n": 5, - "samples": [ - 0.055, - 0.053, - 0.054, - 0.052, - 0.048 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0508084, - "stddev": 0.0035603533953808553, - "n": 5, - "samples": [ - 0.053545, - 0.051917, - 0.052898, - 0.051004, - 0.044678 - ] - }, - "rss_peak_kb": 19680, - "heap_allocated_kb": 2116, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:00.917722161Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.038572, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.038572 - ] - }, - "memory_bytes": 290816, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:10.930037284Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "latency", - "operation": "prepare", - "cpu_time_ms": { - "user_ms": { - "mean": 0.653, - "stddev": 0.014713938969562171, - "n": 5, - "samples": [ - 0.649, - 0.677, - 0.642, - 0.641, - 0.656 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.6191846, - "stddev": 0.011506340504261124, - "n": 5, - "samples": [ - 0.616856, - 0.636202, - 0.609315, - 0.608852, - 0.624698 - ] - }, - "rss_peak_kb": 18100, - "heap_allocated_kb": 1834, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:30:39.897095505Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 28162721.602043852, - "stddev": 1809029.7585605541, - "n": 5, - "samples": [ - 31390767.975138515, - 27135201.139678445, - 27427355.221277043, - 27439170.78825878, - 27421112.88586647 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.7136, - "stddev": 0.04242994225779712, - "n": 5, - "samples": [ - 0.638, - 0.739, - 0.73, - 0.73, - 0.731 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.7123258, - "stddev": 0.042175054009449736, - "n": 5, - "samples": [ - 0.63713, - 0.73705, - 0.729199, - 0.728885, - 0.729365 - ] - }, - "rss_peak_kb": 11388, - "heap_allocated_kb": 1063, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:21.096730810Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 23701944.566575978, - "stddev": 311244.1665571999, - "n": 5, - "samples": [ - 24085412.133785356, - 23567273.177373435, - 23406766.325727772, - 23466193.39890064, - 23984077.797092687 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0422, - "stddev": 0.0010954451150103303, - "n": 5, - "samples": [ - 0.041, - 0.042, - 0.042, - 0.042, - 0.044 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.040171, - "stddev": 0.0005253784350351676, - "n": 5, - "samples": [ - 0.039526, - 0.040395, - 0.040672, - 0.040569, - 0.039693 - ] - }, - "rss_peak_kb": 11388, - "heap_allocated_kb": 745, - "memory_bytes": 5440 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:21.096734392Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 0.0034000000000000002, - "stddev": 0.0008944271909999159, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0020572, - "stddev": 0.0012774469460607749, - "n": 5, - "samples": [ - 0.004306, - 0.001806, - 0.001548, - 0.001171, - 0.001455 - ] - }, - "rss_peak_kb": 11388, - "heap_allocated_kb": 649, - "memory_bytes": 5440, - "merge_folds_per_sec": { - "mean": 594638.9936792739, - "stddev": 229938.2115084501, - "n": 5, - "samples": [ - 232234.09196470043, - 553709.8560354374, - 645994.8320413437, - 853970.9649871903, - 687285.2233676976 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:21.096740591Z" - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "algorithm": "cms", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.034479, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.034479 - ] - }, - "memory_bytes": 5440, - "accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:31.109513390Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 1054878.7529622247, - "stddev": 13490.593047977407, - "n": 5, - "samples": [ - 1071998.7024527707, - 1041803.6204342695, - 1062802.2044855887, - 1040846.8913182024, - 1056942.3461202923 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 18.163800000000002, - "stddev": 1.6362659319316044, - "n": 5, - "samples": [ - 18.658, - 19.2, - 18.82, - 15.258, - 18.883 - ] - }, - "sys_ms": { - "mean": 0.8, - "stddev": 1.7660239239602618, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 3.959, - 0.041 - ] - } - }, - "wall_time_ms": { - "mean": 18.9620044, - "stddev": 0.2423575070413541, - "n": 5, - "samples": [ - 18.656739, - 19.197476, - 18.818177, - 19.215122, - 18.922508 - ] - }, - "rss_peak_kb": 282740, - "heap_allocated_kb": 243573, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:41.749943048Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 256228.72449741198, - "stddev": 11292.720263634823, - "n": 5, - "samples": [ - 243899.6895915295, - 261289.37523844026, - 259558.75556844866, - 245675.07355413638, - 270720.7285345051 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 3.7236, - "stddev": 0.16319865195521674, - "n": 5, - "samples": [ - 3.905, - 3.645, - 3.67, - 3.877, - 3.521 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 3.7212106, - "stddev": 0.16400413922611823, - "n": 5, - "samples": [ - 3.903244, - 3.64347, - 3.667763, - 3.875037, - 3.516539 - ] - }, - "rss_peak_kb": 282740, - "heap_allocated_kb": 175234, - "memory_bytes": 9960000 - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:41.749948041Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "merge", - "cpu_time_ms": { - "user_ms": { - "mean": 2.3392, - "stddev": 1.377852931194037, - "n": 5, - "samples": [ - 2.201, - 3.36, - 3.061, - 3.074, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.8717999999999999, - "stddev": 1.3566437262597724, - "n": 5, - "samples": [ - 1.268, - 0.0, - 0.0, - 0.0, - 3.091 - ] - } - }, - "wall_time_ms": { - "mean": 3.2096344, - "stddev": 0.1902568303315285, - "n": 5, - "samples": [ - 3.467937, - 3.358821, - 3.059319, - 3.072391, - 3.089704 - ] - }, - "rss_peak_kb": 282740, - "heap_allocated_kb": 77909, - "memory_bytes": 9960000, - "merge_folds_per_sec": { - "mean": 312.416905143808, - "stddev": 18.032344970976638, - "n": 5, - "samples": [ - 288.3558726701206, - 297.7235166744521, - 326.8701302479408, - 325.47940675519493, - 323.6555993713314 - ] - }, - "merge_shards": 2, - "merge_supported": true - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:41.749955645Z" - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "algorithm": "countsketch", - "impl": "lib", - "language": "rust", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 11.657846, - "stddev": 0.0, - "n": 1, - "samples": [ - 11.657846 - ] - }, - "memory_bytes": 9960000, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:29:51.869504061Z" - } - ], - [ - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "insert", - "throughput_items_per_sec": { - "mean": 563610291.179971, - "stddev": 84499627.75809486, - "n": 5, - "samples": [ - 676315433.5181929, - 438943025.19532967, - 556544968.8334817, - 579659739.7327769, - 566588288.6200742 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.037399999999999996, - "stddev": 0.006107372593840989, - "n": 5, - "samples": [ - 0.03, - 0.047, - 0.037, - 0.036, - 0.037 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0361748, - "stddev": 0.005817495397505699, - "n": 5, - "samples": [ - 0.029572, - 0.045564, - 0.035936, - 0.034503, - 0.035299 - ] - }, - "rss_peak_kb": 19340, - "heap_allocated_kb": 3227, - "memory_bytes": 262144 - }, - "source": "cli", - "timestamp": "2026-09-08T16:30:01.921598570Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "throughput", - "operation": "query", - "throughput_items_per_sec": { - "mean": 18649557.421572324, - "stddev": 698936.0781584837, - "n": 5, - "samples": [ - 18541962.877120543, - 17965314.86478836, - 18181123.71567167, - 18799739.331345405, - 19759646.318935636 - ] - }, - "cpu_time_ms": { - "user_ms": { - "mean": 0.0528, - "stddev": 0.0008366600265340761, - "n": 5, - "samples": [ - 0.053, - 0.054, - 0.053, - 0.052, - 0.052 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.0511028, - "stddev": 0.0018689767788819616, - "n": 5, - "samples": [ - 0.051343, - 0.052991, - 0.052362, - 0.050639, - 0.048179 - ] - }, - "rss_peak_kb": 19416, - "heap_allocated_kb": 2095, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:30:01.921611814Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 1, - "bench": { - "metric": "accuracy", - "operation": "query", - "wall_time_ms": { - "mean": 0.045292, - "stddev": 0.0, - "n": 1, - "samples": [ - 0.045292 - ] - }, - "memory_bytes": 290816, - "accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - }, - "source": "cli", - "timestamp": "2026-09-08T16:30:11.936886853Z" - }, - { - "schema_version": 5, - "sketch": "cms", - "algorithm": "cms", - "impl": "polars", - "language": "rust", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "mode": "bench", - "runs": 5, - "bench": { - "metric": "latency", - "operation": "prepare", - "cpu_time_ms": { - "user_ms": { - "mean": 0.7058, - "stddev": 0.008927485648266254, - "n": 5, - "samples": [ - 0.709, - 0.712, - 0.694, - 0.699, - 0.715 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "wall_time_ms": { - "mean": 0.6661268, - "stddev": 0.009004891792797919, - "n": 5, - "samples": [ - 0.670366, - 0.672885, - 0.654097, - 0.659045, - 0.674241 - ] - }, - "rss_peak_kb": 18852, - "heap_allocated_kb": 1857, - "memory_bytes": 290816 - }, - "source": "cli", - "timestamp": "2026-09-08T16:30:49.921276565Z" - } - ] -] diff --git a/tools/empirical-bench/results/planner-evidence.json b/tools/empirical-bench/results/planner-evidence.json deleted file mode 100644 index 64486cff..00000000 --- a/tools/empirical-bench/results/planner-evidence.json +++ /dev/null @@ -1,433 +0,0 @@ -{ - "schema_version": 1, - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", - "model_version": "empirical-update-cpu-v1", - "records": [ - { - "id": "cms-uniform-seed42", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788884847, - "valid_until_unix_seconds": 1791476847, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": null, - "update_cpu_ns": { - "value": 36.64, - "stddev": 2.67240528363495, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "merge_cpu_ns": { - "value": 11599.999999999998, - "stddev": 7924.645102463578, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" - }, - "read_cpu_ns": { - "value": 49.8, - "stddev": 3.114482300479483, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": null, - "disk_bytes": null - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 1.6347221960194194, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - } - } - } - }, - { - "id": "countsketch-uniform-seed42", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "uniform-n20000-c1000-seed42", - "family": "uniform", - "sample_count": 20000, - "distinct_count": 1000, - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788884867, - "valid_until_unix_seconds": 1791476867, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": null, - "update_cpu_ns": { - "value": 1179.19, - "stddev": 36.380478968809676, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "merge_cpu_ns": { - "value": 3321800.0, - "stddev": 97791.615182489, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" - }, - "read_cpu_ns": { - "value": 3813.4, - "stddev": 151.51831572453565, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": null, - "disk_bytes": null - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - }, - { - "id": "cms-zipf-seed42", - "algorithm": "Cms", - "params": { - "Cms": { - "width": 272, - "depth": 5 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788884961, - "valid_until_unix_seconds": 1791476961, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": null, - "update_cpu_ns": { - "value": 35.68, - "stddev": 2.1214971128898594, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "merge_cpu_ns": { - "value": 3400.0, - "stddev": 894.4271909999158, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" - }, - "read_cpu_ns": { - "value": 44.32773109243698, - "stddev": 1.150677641817575, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 5440.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": null, - "disk_bytes": null - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 2.3164860214890104, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - } - } - } - }, - { - "id": "countsketch-zipf-seed42", - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "width": 30000, - "depth": 83 - } - }, - "distribution": { - "id": "zipf-n20000-c1000-seed42", - "family": "zipf", - "sample_count": 20000, - "distinct_count": 952, - "parameters": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - } - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2", - "implementation": "asap_sketchlib RegularPath Vector2D", - "id": "c9590114bad98348" - }, - "measured_at_unix_seconds": 1788884981, - "valid_until_unix_seconds": 1791476981, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032", - "repetitions": 5 - }, - "metrics": { - "build_cpu_ns": null, - "update_cpu_ns": { - "value": 948.1899999999999, - "stddev": 12.136638743902814, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item" - }, - "merge_cpu_ns": { - "value": 3211000.0, - "stddev": 190022.36710450685, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge" - }, - "read_cpu_ns": { - "value": 3911.344537815126, - "stddev": 171.42715541514374, - "samples": 5, - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup" - }, - "retained_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "peak_bytes": { - "value": 9960000.0, - "stddev": 0.0, - "samples": 5, - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages" - }, - "serialized_bytes": null, - "disk_bytes": null - }, - "error": { - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": 0.0, - "max": null, - "trials": 1, - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": { - "kind": "point_frequency", - "value_type": "i64", - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - } - } - } - } - ] -} diff --git a/tools/empirical-bench/results/raw.json b/tools/empirical-bench/results/raw.json deleted file mode 100644 index 5d66a81f..00000000 --- a/tools/empirical-bench/results/raw.json +++ /dev/null @@ -1,1367 +0,0 @@ -[ - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 5440, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:27:27.004798255Z", - "insert_throughput_items_per_sec": { - "mean": 27462414.421672627, - "stddev": 2121229.9002417843, - "n": 5, - "samples": [ - 31031952.049427696, - 26920835.24583434, - 25374495.84048577, - 27277277.618584555, - 26707511.35403077 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7328, - "stddev": 0.05344810567269899, - "n": 5, - "samples": [ - 0.645, - 0.745, - 0.79, - 0.734, - 0.75 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7315346, - "stddev": 0.052957671689756146, - "n": 5, - "samples": [ - 0.644497, - 0.742919, - 0.788193, - 0.733211, - 0.748853 - ] - }, - "insert_rss_peak_kb": 11636, - "insert_heap_allocated_kb": 1051, - "query_timestamp": "2026-09-08T16:27:37.016887019Z", - "query_throughput_items_per_sec": { - "mean": 21136707.885741428, - "stddev": 1286805.8474790915, - "n": 5, - "samples": [ - 22205444.775058843, - 20005601.568439163, - 21994457.396736026, - 19484062.03725353, - 21993973.65121957 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0498, - "stddev": 0.0031144823004794846, - "n": 5, - "samples": [ - 0.046, - 0.052, - 0.047, - 0.053, - 0.051 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.047455399999999995, - "stddev": 0.002964145205619997, - "n": 5, - "samples": [ - 0.045034, - 0.049986, - 0.045466, - 0.051324, - 0.045467 - ] - }, - "query_rss_peak_kb": 11636, - "query_heap_allocated_kb": 733, - "merge_timestamp": "2026-09-08T16:27:27.004813199Z", - "merge_folds_per_sec": { - "mean": 275909.67387786397, - "stddev": 296280.2804938654, - "n": 5, - "samples": [ - 56363.43140570398, - 64110.78343377357, - 61001.6470444702, - 638162.0931716656, - 559910.4143337066 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0116, - "stddev": 0.007924645102463582, - "n": 5, - "samples": [ - 0.019, - 0.016, - 0.017, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0106172, - "stddev": 0.00819797570745364, - "n": 5, - "samples": [ - 0.017742, - 0.015598, - 0.016393, - 0.001567, - 0.001786 - ] - }, - "merge_rss_peak_kb": 11636, - "merge_heap_allocated_kb": 637, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 9960000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:27:47.716913903Z", - "insert_throughput_items_per_sec": { - "mean": 848776.7177355861, - "stddev": 25678.34947988661, - "n": 5, - "samples": [ - 809565.9281549908, - 837084.7635798482, - 862354.5833025042, - 873857.5295890344, - 861020.7840515531 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 22.788200000000003, - "stddev": 2.090169060148008, - "n": 5, - "samples": [ - 24.698, - 23.895, - 23.195, - 22.89, - 19.263 - ] - }, - "sys_ms": { - "mean": 0.7956, - "stddev": 1.7734307993265483, - "n": 5, - "samples": [ - 0.01, - 0.0, - 0.0, - 0.0, - 3.968 - ] - } - }, - "insert_wall_time_ms": { - "mean": 23.580925, - "stddev": 0.7274234664406292, - "n": 5, - "samples": [ - 24.704597, - 23.892443, - 23.192316, - 22.887026, - 23.228243 - ] - }, - "insert_rss_peak_kb": 282480, - "insert_heap_allocated_kb": 243573, - "query_timestamp": "2026-09-08T16:27:57.855957080Z", - "query_throughput_items_per_sec": { - "mean": 262769.15824652876, - "stddev": 10337.665821738738, - "n": 5, - "samples": [ - 271225.35002309486, - 264678.5426164215, - 250768.41712216655, - 273759.29549687856, - 253414.18597408233 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "sys_ms": { - "mean": 3.8134, - "stddev": 0.15151831572453558, - "n": 5, - "samples": [ - 3.69, - 3.78, - 3.99, - 3.655, - 3.952 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.810367, - "stddev": 0.15080200586033313, - "n": 5, - "samples": [ - 3.686971, - 3.778168, - 3.987743, - 3.652844, - 3.946109 - ] - }, - "query_rss_peak_kb": 282480, - "query_heap_allocated_kb": 175245, - "merge_timestamp": "2026-09-08T16:27:47.716927415Z", - "merge_folds_per_sec": { - "mean": 301.39109825961305, - "stddev": 9.144410218672732, - "n": 5, - "samples": [ - 316.7997648078546, - 301.0282825102267, - 297.9194497308596, - 298.5947236520762, - 292.6132705970481 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.9908, - "stddev": 1.4396316195471677, - "n": 5, - "samples": [ - 3.158, - 0.0, - 0.0, - 0.0, - 1.796 - ] - }, - "sys_ms": { - "mean": 2.331, - "stddev": 1.501450964900286, - "n": 5, - "samples": [ - 0.0, - 3.324, - 3.358, - 3.351, - 1.622 - ] - } - }, - "merge_wall_time_ms": { - "mean": 3.3203256, - "stddev": 0.0979774039526462, - "n": 5, - "samples": [ - 3.156568, - 3.321947, - 3.356612, - 3.349021, - 3.41748 - ] - }, - "merge_rss_peak_kb": 282480, - "merge_heap_allocated_kb": 77909, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms", - "impl": "polars", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "uniform", - "lower_bound": 0.0, - "upper_bound": 1000.0, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 262144, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:29:00.917715465Z", - "insert_throughput_items_per_sec": { - "mean": 582378449.9780885, - "stddev": 76256068.40887626, - "n": 5, - "samples": [ - 685518423.3076264, - 470278404.8156509, - 582360306.3215212, - 589640024.764881, - 584095090.6807629 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.036000000000000004, - "stddev": 0.005049752469181039, - "n": 5, - "samples": [ - 0.03, - 0.044, - 0.036, - 0.035, - 0.035 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.0348412, - "stddev": 0.004812785388940589, - "n": 5, - "samples": [ - 0.029175, - 0.042528, - 0.034343, - 0.033919, - 0.034241 - ] - }, - "insert_rss_peak_kb": 19412, - "insert_heap_allocated_kb": 3248, - "query_timestamp": "2026-09-08T16:29:10.930037284Z", - "query_throughput_items_per_sec": { - "mean": 19766077.209879298, - "stddev": 1504687.1387838016, - "n": 5, - "samples": [ - 18675880.10084975, - 19261513.56973631, - 18904306.400998145, - 19606305.38781272, - 22382380.589999553 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0524, - "stddev": 0.0027018512172212595, - "n": 5, - "samples": [ - 0.055, - 0.053, - 0.054, - 0.052, - 0.048 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0508084, - "stddev": 0.0035603533953808553, - "n": 5, - "samples": [ - 0.053545, - 0.051917, - 0.052898, - 0.051004, - 0.044678 - ] - }, - "query_rss_peak_kb": 19680, - "query_heap_allocated_kb": 2116, - "merge_timestamp": null, - "merge_shards": null, - "merge_supported": null, - "merge_cpu_time_ms": null, - "merge_wall_time_ms": null, - "merge_rss_peak_kb": null, - "merge_heap_allocated_kb": null, - "prepare_timestamp": "2026-09-08T16:30:39.897095505Z", - "prepare_cpu_time_ms": { - "user_ms": { - "mean": 0.653, - "stddev": 0.014713938969562171, - "n": 5, - "samples": [ - 0.649, - 0.677, - 0.642, - 0.641, - 0.656 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "prepare_wall_time_ms": { - "mean": 0.6191846, - "stddev": 0.011506340504261124, - "n": 5, - "samples": [ - 0.616856, - 0.636202, - 0.609315, - 0.608852, - 0.624698 - ] - }, - "prepare_rss_peak_kb": 18100, - "prepare_heap_allocated_kb": 1834 - }, - { - "schema_version": 5, - "sketch": "cms-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms-regularpath-vector2d", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 5440, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:29:21.096730810Z", - "insert_throughput_items_per_sec": { - "mean": 28162721.602043852, - "stddev": 1809029.758560554, - "n": 5, - "samples": [ - 31390767.975138515, - 27135201.139678445, - 27427355.221277043, - 27439170.78825878, - 27421112.88586647 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.7136, - "stddev": 0.04242994225779712, - "n": 5, - "samples": [ - 0.638, - 0.739, - 0.73, - 0.73, - 0.731 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.7123258, - "stddev": 0.042175054009449736, - "n": 5, - "samples": [ - 0.63713, - 0.73705, - 0.729199, - 0.728885, - 0.729365 - ] - }, - "insert_rss_peak_kb": 11388, - "insert_heap_allocated_kb": 1063, - "query_timestamp": "2026-09-08T16:29:31.109513390Z", - "query_throughput_items_per_sec": { - "mean": 23701944.566575974, - "stddev": 311244.1665571999, - "n": 5, - "samples": [ - 24085412.133785356, - 23567273.177373435, - 23406766.325727772, - 23466193.39890064, - 23984077.797092687 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0422, - "stddev": 0.0010954451150103305, - "n": 5, - "samples": [ - 0.041, - 0.042, - 0.042, - 0.042, - 0.044 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.040171, - "stddev": 0.0005253784350351676, - "n": 5, - "samples": [ - 0.039526, - 0.040395, - 0.040672, - 0.040569, - 0.039693 - ] - }, - "query_rss_peak_kb": 11388, - "query_heap_allocated_kb": 745, - "merge_timestamp": "2026-09-08T16:29:21.096740591Z", - "merge_folds_per_sec": { - "mean": 594638.9936792739, - "stddev": 229938.2115084501, - "n": 5, - "samples": [ - 232234.09196470043, - 553709.8560354374, - 645994.8320413437, - 853970.9649871903, - 687285.2233676976 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 0.0034, - "stddev": 0.0008944271909999159, - "n": 5, - "samples": [ - 0.005, - 0.003, - 0.003, - 0.003, - 0.003 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "merge_wall_time_ms": { - "mean": 0.0020572, - "stddev": 0.0012774469460607749, - "n": 5, - "samples": [ - 0.004306, - 0.001806, - 0.001548, - 0.001171, - 0.001455 - ] - }, - "merge_rss_peak_kb": 11388, - "merge_heap_allocated_kb": 649, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "countsketch-regularpath-vector2d", - "impl": "lib", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "countsketch-regularpath-vector2d", - "params": { - "cols": 30000, - "rows": 83 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 9960000, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:29:41.749943048Z", - "insert_throughput_items_per_sec": { - "mean": 1054878.752962225, - "stddev": 13490.593047977409, - "n": 5, - "samples": [ - 1071998.702452771, - 1041803.6204342695, - 1062802.2044855887, - 1040846.8913182024, - 1056942.3461202923 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 18.1638, - "stddev": 1.6362659319316044, - "n": 5, - "samples": [ - 18.658, - 19.2, - 18.82, - 15.258, - 18.883 - ] - }, - "sys_ms": { - "mean": 0.8, - "stddev": 1.7660239239602618, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 3.959, - 0.041 - ] - } - }, - "insert_wall_time_ms": { - "mean": 18.9620044, - "stddev": 0.2423575070413541, - "n": 5, - "samples": [ - 18.656739, - 19.197476, - 18.818177, - 19.215122, - 18.922508 - ] - }, - "insert_rss_peak_kb": 282740, - "insert_heap_allocated_kb": 243573, - "query_timestamp": "2026-09-08T16:29:51.869504061Z", - "query_throughput_items_per_sec": { - "mean": 256228.724497412, - "stddev": 11292.720263634825, - "n": 5, - "samples": [ - 243899.6895915295, - 261289.37523844023, - 259558.75556844863, - 245675.0735541364, - 270720.7285345051 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 3.7236, - "stddev": 0.16319865195521674, - "n": 5, - "samples": [ - 3.905, - 3.645, - 3.67, - 3.877, - 3.521 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 3.7212106, - "stddev": 0.16400413922611823, - "n": 5, - "samples": [ - 3.903244, - 3.64347, - 3.667763, - 3.875037, - 3.516539 - ] - }, - "query_rss_peak_kb": 282740, - "query_heap_allocated_kb": 175234, - "merge_timestamp": "2026-09-08T16:29:41.749955645Z", - "merge_folds_per_sec": { - "mean": 312.416905143808, - "stddev": 18.03234497097664, - "n": 5, - "samples": [ - 288.3558726701206, - 297.7235166744521, - 326.8701302479408, - 325.47940675519493, - 323.6555993713314 - ] - }, - "merge_shards": 2, - "merge_supported": true, - "merge_cpu_time_ms": { - "user_ms": { - "mean": 2.3392, - "stddev": 1.377852931194037, - "n": 5, - "samples": [ - 2.201, - 3.36, - 3.061, - 3.074, - 0.0 - ] - }, - "sys_ms": { - "mean": 0.8717999999999999, - "stddev": 1.3566437262597724, - "n": 5, - "samples": [ - 1.268, - 0.0, - 0.0, - 0.0, - 3.091 - ] - } - }, - "merge_wall_time_ms": { - "mean": 3.2096344, - "stddev": 0.1902568303315285, - "n": 5, - "samples": [ - 3.467937, - 3.358821, - 3.059319, - 3.072391, - 3.089704 - ] - }, - "merge_rss_peak_kb": 282740, - "merge_heap_allocated_kb": 77909, - "prepare_timestamp": null, - "prepare_cpu_time_ms": null, - "prepare_wall_time_ms": null, - "prepare_rss_peak_kb": null, - "prepare_heap_allocated_kb": null - }, - { - "schema_version": 5, - "sketch": "cms", - "impl": "polars", - "language": "rust", - "mode": "bench", - "runs": 5, - "source": "cli", - "sketch_config": { - "algorithm": "cms", - "params": { - "cols": 272, - "rows": 5 - } - }, - "workload": { - "synthetic": { - "description": { - "column_num": 1, - "column_label": [ - "key" - ], - "column_spec": [ - { - "distribution": { - "kind": "zipf", - "skewness": 1.1, - "population_size": 1000, - "seed": 42 - }, - "special_rule": 0, - "data_type": "i64" - } - ], - "row_num": 20000 - } - } - }, - "memory_bytes": 262144, - "heap_bytes_net": null, - "heap_bytes_peak": null, - "insert_timestamp": "2026-09-08T16:30:01.921598570Z", - "insert_throughput_items_per_sec": { - "mean": 563610291.179971, - "stddev": 84499627.75809486, - "n": 5, - "samples": [ - 676315433.5181929, - 438943025.19532967, - 556544968.8334817, - 579659739.7327769, - 566588288.6200742 - ] - }, - "insert_latency_ns": null, - "insert_cpu_time_ms": { - "user_ms": { - "mean": 0.0374, - "stddev": 0.006107372593840989, - "n": 5, - "samples": [ - 0.03, - 0.047, - 0.037, - 0.036, - 0.037 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "insert_wall_time_ms": { - "mean": 0.0361748, - "stddev": 0.005817495397505699, - "n": 5, - "samples": [ - 0.029572, - 0.045564, - 0.035936, - 0.034503, - 0.035299 - ] - }, - "insert_rss_peak_kb": 19340, - "insert_heap_allocated_kb": 3227, - "query_timestamp": "2026-09-08T16:30:11.936886853Z", - "query_throughput_items_per_sec": { - "mean": 18649557.421572324, - "stddev": 698936.0781584837, - "n": 5, - "samples": [ - 18541962.877120543, - 17965314.86478836, - 18181123.71567167, - 18799739.331345405, - 19759646.318935636 - ] - }, - "query_latency_ns": null, - "query_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "query_cpu_time_ms": { - "user_ms": { - "mean": 0.0528, - "stddev": 0.0008366600265340761, - "n": 5, - "samples": [ - 0.053, - 0.054, - 0.053, - 0.052, - 0.052 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "query_wall_time_ms": { - "mean": 0.0511028, - "stddev": 0.0018689767788819616, - "n": 5, - "samples": [ - 0.051343, - 0.052991, - 0.052362, - 0.050639, - 0.048179 - ] - }, - "query_rss_peak_kb": 19416, - "query_heap_allocated_kb": 2095, - "merge_timestamp": null, - "merge_shards": null, - "merge_supported": null, - "merge_cpu_time_ms": null, - "merge_wall_time_ms": null, - "merge_rss_peak_kb": null, - "merge_heap_allocated_kb": null, - "prepare_timestamp": "2026-09-08T16:30:49.921276565Z", - "prepare_cpu_time_ms": { - "user_ms": { - "mean": 0.7058, - "stddev": 0.008927485648266254, - "n": 5, - "samples": [ - 0.709, - 0.712, - 0.694, - 0.699, - 0.715 - ] - }, - "sys_ms": { - "mean": 0.0, - "stddev": 0.0, - "n": 5, - "samples": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - } - }, - "prepare_wall_time_ms": { - "mean": 0.6661268, - "stddev": 0.009004891792797919, - "n": 5, - "samples": [ - 0.670366, - 0.672885, - 0.654097, - 0.659045, - 0.674241 - ] - }, - "prepare_rss_peak_kb": 18852, - "prepare_heap_allocated_kb": 1857 - } -] diff --git a/tools/empirical-bench/results/replay-uniform.json b/tools/empirical-bench/results/replay-uniform.json deleted file mode 100644 index 51a2a3a6..00000000 --- a/tools/empirical-bench/results/replay-uniform.json +++ /dev/null @@ -1,72556 +0,0 @@ -{ - "assumptions": { - "data_arrival": "at_rest", - "evaluation_time_ms": 1788825600000, - "evaluations_per_query": 60, - "lifecycle_horizon_seconds": 3600, - "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", - "runtime_capabilities": "hypothetical all supported, no runtime launched", - "timing": "single wall-clock sample; report/materialization timing includes JSON export" - }, - "corpora": [ - { - "name": "o11y_bench", - "runs": [ - { - "accuracy": "Exact", - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 139998327, - "memo_groups": 147, - "mode": "exact", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4911159, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2835596, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2894982, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5407258, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5521000, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3527022, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1857949, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1877251, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1870414, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1857021, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1873167, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1026128, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2880294, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3222728, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2493302, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2236489, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4809448, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5431739, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4755172, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1199703, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2564270, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2268349, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2314772, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4819912, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4784771, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1889647, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1171468, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 19043375, - "selection_ns": 4903446 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 133938923, - "memo_groups": 147, - "mode": "default", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4775948, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2818771, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2828857, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5152425, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5423275, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3484232, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1829054, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1814042, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1809970, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1815448, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1822033, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1021764, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2765277, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3148730, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2450000, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2172139, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4604254, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5259252, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4625196, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1206076, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2501833, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2214503, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2226429, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4622730, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4713808, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1893623, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1176811, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 18958317, - "selection_ns": 4901236 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 133505728, - "memo_groups": 147, - "mode": "empirical", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4737649, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2828146, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2817829, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5138896, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5410059, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3478909, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1829056, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1807307, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1810338, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1798996, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1817237, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1016105, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2762729, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3138971, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2440055, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2170272, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4581888, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5238822, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4610586, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1201123, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2489248, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2204598, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2221488, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4606852, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4644859, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1898089, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1168187, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 18890262, - "selection_ns": 4890102 - } - ], - "source": "repository-vendored grafana/o11y-bench snapshot" - }, - { - "name": "supplemental_sketch_queries", - "runs": [ - { - "accuracy": "Exact", - "coverage_counts": { - "exact_fallback": 2, - "exact_summary_candidate": 1 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 11098488, - "memo_groups": 9, - "mode": "exact", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Exact }" - } - ], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 13102433138774020871, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1384933, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 13102433138774020871, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Exact }" - } - ], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17576251049183068994, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1361050, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17576251049183068994, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Count, Count)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as an exact Count accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Exact }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7632360923926288101, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 1259135, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Count, Count)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Count): row count is independent of input values" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Count))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Count): row count is independent of input values" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 789907, - "selection_ns": 199056 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "sketch_candidate": 3 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 10677348, - "memo_groups": 9, - "mode": "default", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10955175475988740718, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1539398, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.95 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.95 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11077479386785785312, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1517505, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.99 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.99 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12306718525742052945, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 1504768, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Cms))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "PointCount { key: SampleValue, value: None }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 924537, - "selection_ns": 246475 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "sketch_candidate": 3 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 10677844, - "memo_groups": 9, - "mode": "empirical", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10955175475988740718, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1526275, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.95 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.95 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11077479386785785312, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1526459, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.99 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.99 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "measurement": { - "algorithm": "Cms", - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "error": { - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "max": null, - "mean": 1.6347221960194194, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "query": { - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 31.035, - "aae_top1": 25.0, - "aae_top10": 25.9, - "aae_top100": 30.2, - "aae_top1000": 31.035, - "accuracy_runs": 1, - "are_all": 1.6347221960194194, - "are_top1": 0.6097560975609756, - "are_top10": 0.7804431144999306, - "are_top100": 1.079453856854533, - "are_top1000": 1.6347221960194205, - "l1_err": 31035.0, - "l2_err": 1159.3657748959126, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 1.6347221960194194, - "relative_error_p99": 4.733333333333333 - }, - "kind": "point_frequency", - "value_type": "i64" - }, - "trials": 1 - }, - "id": "cms-uniform-seed42", - "measured_at_unix_seconds": 1788884847, - "metrics": { - "build_cpu_ns": null, - "disk_bytes": null, - "merge_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", - "samples": 5, - "stddev": 7924.645102463578, - "value": 11599.999999999998 - }, - "peak_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 5440.0 - }, - "read_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", - "samples": 5, - "stddev": 3.114482300479483, - "value": 49.8 - }, - "retained_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 5440.0 - }, - "serialized_bytes": null, - "update_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", - "samples": 5, - "stddev": 2.67240528363495, - "value": 36.64 - } - }, - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "repetitions": 5, - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" - }, - "valid_until_unix_seconds": 1791476847 - }, - "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", - "status": "matched_configuration" - }, - "sketch": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "measurement": { - "algorithm": "CountSketch", - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "error": { - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "max": null, - "mean": 0.0, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "query": { - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "aae_top1000": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "are_top1000": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 1000.0, - "probes_all": 1000.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "probes_top1000": 1000.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "kind": "point_frequency", - "value_type": "i64" - }, - "trials": 1 - }, - "id": "countsketch-uniform-seed42", - "measured_at_unix_seconds": 1788884867, - "metrics": { - "build_cpu_ns": null, - "disk_bytes": null, - "merge_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", - "samples": 5, - "stddev": 97791.615182489, - "value": 3321800.0 - }, - "peak_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 9960000.0 - }, - "read_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", - "samples": 5, - "stddev": 151.51831572453565, - "value": 3813.4 - }, - "retained_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 9960000.0 - }, - "serialized_bytes": null, - "update_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", - "samples": 5, - "stddev": 36.38047896880968, - "value": 1179.19 - } - }, - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - }, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset uniform --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "repetitions": 5, - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" - }, - "valid_until_unix_seconds": 1791476867 - }, - "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", - "status": "matched_configuration" - }, - "sketch": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12306718525742052945, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 2538112, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Cms))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "PointCount { key: SampleValue, value: None }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 912771, - "selection_ns": 273722 - } - ], - "source": "local supplemental examples, not upstream o11y queries" - } - ], - "empirical_artifact": { - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", - "model_version": "empirical-update-cpu-v1", - "schema_version": 1 - }, - "empirical_context": { - "distribution": { - "distinct_count": 1000, - "family": "uniform", - "id": "uniform-n20000-c1000-seed42", - "parameters": { - "kind": "uniform", - "lower_bound": 0.0, - "seed": 42, - "upper_bound": 1000.0 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788884981 - }, - "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", - "schema_version": 1, - "vendored_fixture_source": { - "note": "existing 27-query local fixture; upstream revision and scenario data were not provided", - "repository": "https://github.com/grafana/o11y-bench", - "upstream_commit": null, - "vendored_snapshot_date": "2026-07-17" - } -} diff --git a/tools/empirical-bench/results/replay-zipf.json b/tools/empirical-bench/results/replay-zipf.json deleted file mode 100644 index e0c324b7..00000000 --- a/tools/empirical-bench/results/replay-zipf.json +++ /dev/null @@ -1,72550 +0,0 @@ -{ - "assumptions": { - "data_arrival": "at_rest", - "evaluation_time_ms": 1788825600000, - "evaluations_per_query": 60, - "lifecycle_horizon_seconds": 3600, - "replay_semantics": "repeated reads at one fixed as-of time; query windows and offsets remain in IR", - "runtime_capabilities": "hypothetical all supported, no runtime launched", - "timing": "single wall-clock sample; report/materialization timing includes JSON export" - }, - "corpora": [ - { - "name": "o11y_bench", - "runs": [ - { - "accuracy": "Exact", - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 139926864, - "memo_groups": 147, - "mode": "exact", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4881379, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2838791, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2898659, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5395836, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5536637, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3527553, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1854330, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1879353, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1868866, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1869200, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1869809, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1033796, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2874835, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3233151, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2493468, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2234352, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4825075, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5436486, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4755988, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1200510, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2559793, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2278923, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2303288, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4829332, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4777780, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1896495, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1172033, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 18945443, - "selection_ns": 4874737 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 132849589, - "memo_groups": 147, - "mode": "default", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4715711, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2820304, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2818108, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5136004, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5411018, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3480403, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1836535, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1808365, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1811192, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1798842, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1820274, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1018175, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2767902, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3132394, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2439656, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2173357, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4591127, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5241602, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4620909, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1199402, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2493242, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2202658, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2221675, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4603672, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4727445, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1900844, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1172447, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 18860932, - "selection_ns": 4883105 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "exact_fallback": 1, - "exact_summary_candidate": 26 - }, - "lifecycle_raw_fallback_count": 27, - "lowering_ns": 133375526, - "memo_groups": 147, - "mode": "empirical", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 0, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 1, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 2, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 5, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4357565671129963354, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 7022373857605930303, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12714590634108344264, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 11820510057558921127, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 17643830248501223799, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "(sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (increase(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 4724624, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 9, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 10, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 11, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[5m])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2849346, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15031216406180881087, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 6578125261691327152, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 13772896498538340507, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 456035337168236218, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 14, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.99 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.99 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 15, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 16, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=\"order-service\"}[6h])) by (le))", - "rejections": [], - "report_and_materialization_ns": 2824554, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 8595229148929060119, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 9129804314301000689, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1685090337327910000, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 12233764358561311056, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5149178112346058386, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 19, - "heuristic_score": 11.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 20, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 21, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 22, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 25, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 26, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 3, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7328901110799269513, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 16090268644502113127, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7744094383765697368, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 14148027718399404965, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 7166728328935192118, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 3582664093039061079, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "max", - "nullable": true, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max((sum by (job) (rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[6h]))) / (sum by (job) (rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[6h]))))", - "rejections": [], - "report_and_materialization_ns": 5129814, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 12504115826368068707, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 6575550222653195469, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - }, - { - "children": [ - 6 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 7, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 7 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 29, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 31, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 32, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 33, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 36, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 37, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 4, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 9 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 891712026667587775, - "id": 10, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time((sum(rate(http_requests_total{job=\"order-service\",status=~\"5..\"}[5m])) / sum(rate(http_requests_total{job=\"order-service\"}[5m])))[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 5409691, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 11299207876191563645, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 496299464529929253, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10619967846688283201, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 3452496764162792170, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 1627631988009406521, - "id": 9, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 9 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 40, - "heuristic_score": 8.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 42, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "HistogramQuantile { q: 0.95 } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "HistogramQuantile { q: 0.95 }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 43, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 44, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 5, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 5508770796471375213, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 6 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=\"user-service\"}[5m])) by (le))[12h:1m])", - "rejections": [], - "report_and_materialization_ns": 3481021, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_request_duration_seconds_bucket" - } - } - }, - "hash": 5852869092542749055, - "id": 0, - "kind": "Scan", - "label": "Scan(http_request_duration_seconds_bucket)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12002040721701933139, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 545686775099239971, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 3 - ] - } - }, - "hash": 6755468574470158960, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "le", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "histogram_quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1802411125531425629, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 6280156848725840269, - "id": 5, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "histogram_quantile", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 47, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 6, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3880761932090503464, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_cache_refresh_lag_seconds{job=\"user-service\"}[12h])", - "rejections": [], - "report_and_materialization_ns": 1836509, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 43200 - } - }, - "hash": 10235208320742681127, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(43200s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 50, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 7, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9573669344271708315, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"order-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1807818, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11978611282698443115, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 10428696925252998572, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 53, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 8, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4409576069948584546, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=\"payment-service\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1816769, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 11637948610861789279, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 11026529439620961456, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 56, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 9, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12439492146068972559, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(service_retry_queue_depth{job=~\".+\"}[6h])", - "rejections": [], - "report_and_materialization_ns": 1800697, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_retry_queue_depth" - } - } - }, - "hash": 4732210068802657336, - "id": 0, - "kind": "Scan", - "label": "Scan(service_retry_queue_depth)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7844522547549742019, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(MinMax, MinMax)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 59, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Max { col: None } realizes as an exact MinMax accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Max { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 61, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 10, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "max" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4807022209435798463, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "max_over_time(sum(process_resident_memory_bytes)[6h:1m])", - "rejections": [], - "report_and_materialization_ns": 1822384, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - }, - "resolution": { - "nanos": 0, - "secs": 60 - } - }, - "hash": 12477000640617829860, - "id": 2, - "kind": "PromqlSubquery", - "label": "PromqlSubquery", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(PromqlSubquery)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(MinMax, MinMax)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(MinMax))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(MinMax)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_extremum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 11, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "service_cache_refresh_lag_seconds{job=\"user-service\"}", - "rejections": [], - "report_and_materialization_ns": 1018883, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "user-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_cache_refresh_lag_seconds" - } - } - }, - "hash": 13418213253981176398, - "id": 0, - "kind": "Scan", - "label": "Scan(service_cache_refresh_lag_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 12, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sort_desc(sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h])))", - "rejections": [], - "report_and_materialization_ns": 2767764, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [ - 3 - ], - "detail": { - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - }, - "hash": 13146525486139638535, - "id": 4, - "kind": "Sort", - "label": "Sort(1 keys)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Sort)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 70, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 71, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 13, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (increase(http_requests_total{status=~\"5..\",job=~\".+-service\"}[24h])) > 0", - "rejections": [], - "report_and_materialization_ns": 3138399, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 4555860453844271455, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 17695627245133327338, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17745976529714442724, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 3931161581219847493, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - }, - { - "children": [], - "detail": { - "value": { - "Literal": { - "Float64": 0.0 - } - } - }, - "hash": 17462177484913004457, - "id": 4, - "kind": "PromqlScalarBridge", - "label": "PromqlScalarBridge(Literal(Float64(0.0)))", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 4 - ], - "detail": { - "op": ">", - "vector_match": null - }, - "hash": 18310621160903535696, - "id": 5, - "kind": "BinaryOp", - "label": "BinaryOp(>)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 5 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: share_common_subtrees already interned this subtree once and reused it across 2 consumers — one build can answer all of them instead of computing it 2 times", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 65, - "heuristic_score": 5.0, - "rank": 1, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 2, - "families": [], - "group": 65, - "heuristic_score": 8.0, - "rank": 2, - "rationale": "build independently: undo the sharing share_common_subtrees found and recompute this subtree separately at each of its 2 consumers — worth it only when independence outweighs the shared-maintenance cost, a CostModel's call (e.g. CostModel::cse_share_decision) and not this strategy's", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 66, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 66, - "heuristic_score": 3.0, - "rank": 2, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 67, - "heuristic_score": 2.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 0, - "rationale": "build once and share: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [], - "group": 68, - "heuristic_score": 1.0, - "rank": 1, - "rationale": "recompute independently: this subtree can become repeated when a repeated ancestor is recomputed; global_selection decides using its effective consumer count", - "score_unit": "dimensionless_not_cpu", - "strategy": "SharedSubtreeStrategy", - "target_intent": null - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 14, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum by (job) (rate(process_cpu_seconds_total{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2442837, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 13384239780302736870, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1183070750704153722, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9522808892276299504, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - }, - "hash": 6142901349248432701, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 75, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [], - "group": 76, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Avg { col: None } has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Avg { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 15, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5813513527114420555, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(avg_over_time(process_resident_memory_bytes{job=~\".+\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 2172394, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": ".+" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 17194998456257326742, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 1075205487120003937, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "avg" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9474605074443102262, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 79, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 80, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 81, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 84, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 85, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 16, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11735334010684667017, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 11500554457586818971, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10981797669010455262, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 8187023580477152099, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10943211217549070051, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"order-service\",status=~\"5..\"}[24h])) / sum(increase(http_requests_total{status=~\"5..\"}[24h]))", - "rejections": [], - "report_and_materialization_ns": 4578340, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12213285741126836261, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 8706897440781054898, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 434355548163614257, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 86400 - } - }, - "hash": 15214932053778948030, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(86400s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 88, - "heuristic_score": 12.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 89, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 90, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 94, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 95, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 17, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 9544619250709110764, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4752197667737580647, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 5, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 6, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 7, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 7 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 2621875301365032242, - "id": 8, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 8 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 2918023599440896380, - "id": 9, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 4, - 9 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 8305651657190921739, - "id": 10, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 10 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h] offset 6h)) / sum(increase(http_requests_total{job=\"payment-service\"}[1h] offset 6h))", - "rejections": [], - "report_and_materialization_ns": 5239630, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 2044130390646347630, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 16542072202864268241, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 21600000 - } - }, - "hash": 1517877614886195588, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2093660087192948056, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 99, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 100, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 101, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 104, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Increase, Increase)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 105, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Increase realizes as an exact Increase accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Increase" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 18, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18023644529753260288, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 5937562834316033068, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "increase" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 4165756548983382920, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6686132277608031880, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 1269350165958096221, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(increase(http_requests_total{job=\"payment-service\",status=~\"5..\"}[1h])) / sum(increase(http_requests_total{job=\"payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4611045, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 12030228385769071755, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 2812935849703566685, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 8107691065169312504, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 13836124465410210916, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Increase, Increase)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Increase))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Increase)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 108, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 19, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9372206061583279877, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(process_resident_memory_bytes)", - "rejections": [], - "report_and_materialization_ns": 1201059, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_resident_memory_bytes" - } - } - }, - "hash": 6676969730373822799, - "id": 0, - "kind": "Scan", - "label": "Scan(process_resident_memory_bytes)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 110, - "heuristic_score": 6.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 111, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 20, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 14415705963064318307, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 3 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4208478163633478013, - "id": 4, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 4 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m] offset 1h))", - "rejections": [], - "report_and_materialization_ns": 2495514, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "shift": { - "at": null, - "offset_ms": 3600000 - } - }, - "hash": 10500837375405899682, - "id": 1, - "kind": "TimeShift", - "label": "TimeShift", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 1486896920371848857, - "id": 2, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 115, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 116, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 21, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 18241937131606632585, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14348921228394859642, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=\"order-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2201556, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Eq", - "right": { - "Literal": { - "Utf8": "order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 796076758948336469, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 14876166126776615318, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 119, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 120, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 22, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 336986289356308188, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 9900411588081570671, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[5m]))", - "rejections": [], - "report_and_materialization_ns": 2220064, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 5359373914941924135, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 123, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 124, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 125, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 128, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 129, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 23, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 3881266545830301987, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 6995895710432326019, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1762460255519483571, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 16564289612874067248, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 10680303411019709277, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"payment-service|order-service\"}[6h])) / sum(rate(http_requests_total{job=~\"payment-service|order-service\"}[6h]))", - "rejections": [], - "report_and_materialization_ns": 4610344, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 15342092518330887510, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7395377925094412003, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "payment-service|order-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 5749788076224562384, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 21600 - } - }, - "hash": 7382319287546055848, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(21600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 132, - "heuristic_score": 10.0, - "rank": 0, - "rationale": "preserve exact PromQL arithmetic over independently realized summary operands", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": null - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 133, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 134, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 137, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 138, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 24, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7050167201471182651, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 10093052610277408880, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 4, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 4 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 5, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 5 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 15590150853126623828, - "id": 6, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 6 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 4278979949001944744, - "id": 7, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - }, - { - "children": [ - 3, - 7 - ], - "detail": { - "op": "/", - "vector_match": null - }, - "hash": 11062556003957310113, - "id": 8, - "kind": "BinaryOp", - "label": "BinaryOp(/)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 8 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(BinaryOp)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(http_requests_total{status=~\"5..\",job=~\"user-service|order-service|payment-service\"}[1h])) / sum(rate(http_requests_total{job=~\"user-service|order-service|payment-service\"}[1h]))", - "rejections": [], - "report_and_materialization_ns": 4647886, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - }, - { - "Compare": { - "left": { - "Column": 3 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "5.." - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 11885727537787269845, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 10604569320146733947, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": "utf8", - "name": "status", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [ - { - "Compare": { - "left": { - "Column": 2 - }, - "op": "Regex", - "right": { - "Literal": { - "Utf8": "user-service|order-service|payment-service" - } - } - } - } - ], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - }, - "hash": 13514739729584015198, - "id": 0, - "kind": "Scan", - "label": "Scan(http_requests_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 8000143351567832311, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": "utf8", - "name": "job", - "nullable": true, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 3, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 3 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 4, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 4 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 5, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - }, - { - "children": [ - 2, - 5 - ], - "detail": { - "kind": "Arithmetic(Div)", - "vector_match": null - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - }, - "id": 6, - "kind": "SummaryBinaryOp", - "label": "BinaryOp(Arithmetic(Div))" - } - ], - "root": 6 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "BinaryOp over exact operands" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - }, - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 141, - "heuristic_score": 5.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Rate, Rate)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 142, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "Rate realizes as an exact Rate accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Rate" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 25, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 1520923597163513092, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 2 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 14769397965332712593, - "id": 3, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 3 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(rate(process_cpu_seconds_total[1h]))", - "rejections": [], - "report_and_materialization_ns": 1900553, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "process_cpu_seconds_total" - } - } - }, - "hash": 15568127014347136337, - "id": 0, - "kind": "Scan", - "label": "Scan(process_cpu_seconds_total)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 3600 - } - }, - "hash": 14319743876036373276, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(3600s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Rate, Rate)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Rate))" - }, - { - "children": [ - 1 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 2, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Rate)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "constant": null, - "op": "lipschitz" - }, - "rule": "exact_input" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Sum, Sum)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 145, - "heuristic_score": 3.0, - "rank": 0, - "rationale": "Sum { col: None } realizes as an exact Sum accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Sum { col: None }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 26, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - }, - "hash": 1513406633472048957, - "id": 1, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": true, - "columns": [ - { - "dtype": "float64", - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "sum(up)", - "rejections": [], - "report_and_materialization_ns": 1167399, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "up" - } - } - }, - "hash": 5514360871380360673, - "id": 0, - "kind": "Scan", - "label": "Scan(up)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 0 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Scan)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Sum, Sum)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": { - "Reduce": [] - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Sum))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Sum)" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "exact_sum" - }, - "rule": "exact_input" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 27, - "search_ns": 18861143, - "selection_ns": 4884093 - } - ], - "source": "repository-vendored grafana/o11y-bench snapshot" - }, - { - "name": "supplemental_sketch_queries", - "runs": [ - { - "accuracy": "Exact", - "coverage_counts": { - "exact_fallback": 2, - "exact_summary_candidate": 1 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 11045392, - "memo_groups": 9, - "mode": "exact", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Exact }" - } - ], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 13102433138774020871, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1376397, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 13102433138774020871, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) has no summary realization and stays a logical pass-through — the only realization implementations_for_with produces for this intent", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Exact }" - } - ], - "coverage": "exact_fallback", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17576251049183068994, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1362872, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 17576251049183068994, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "ExactAggregate(Count, Count)", - "is_sketch": false, - "offline_evidence": { - "reason": "offline sketch evidence does not cost exact operators", - "status": "unavailable" - }, - "sketch": null - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as an exact Count accumulator — the only realization implementations_for_with produces for this intent (no approximate candidate applies)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Exact }" - } - ], - "coverage": "exact_summary_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": "Exact", - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 7632360923926288101, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 1264121, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "ExactAggregate(Count, Count)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Count): row count is independent of input values" - } - ] - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(ExactAggregate(Count))" - } - ], - "root": 1 - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "ExactAggregate(Count): row count is independent of input values" - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 771269, - "selection_ns": 195148 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "sketch_candidate": 3 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 10671302, - "memo_groups": 9, - "mode": "default", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10955175475988740718, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1545873, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.95 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.95 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11077479386785785312, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1516511, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.99 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.99 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no empirical provider in this mode", - "status": "unavailable" - }, - "sketch": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12306718525742052945, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 1512397, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Cms))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "PointCount { key: SampleValue, value: None }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 919100, - "selection_ns": 243013 - }, - { - "accuracy": { - "Epsilon": 0.01 - }, - "coverage_counts": { - "sketch_candidate": 3 - }, - "lifecycle_raw_fallback_count": 3, - "lowering_ns": 10663641, - "memo_groups": 9, - "mode": "empirical", - "queries": [ - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.95) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 0, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.95) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.95, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 0, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.95 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 10955175475988740718, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.95, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1532522, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.95 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.95 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.95 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "Kll", - "params": { - "Kll": { - "k": 269 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "quantile(q=0.99) realizes as a Kll sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Quantile, algorithm: DDSketch, params: DDSketch { alpha: 0.01 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "reason": "no measurement for algorithm and exact configuration", - "status": "unavailable" - }, - "sketch": { - "algorithm": "DDSketch", - "params": { - "DDSketch": { - "alpha": 0.01 - } - } - } - } - ], - "group": 3, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "quantile(q=0.99) realizes as a DDSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Quantile { col: None, q: 0.99, accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 1, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "col": null, - "kind": "quantile", - "q": 0.99 - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 11077479386785785312, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "quantile_over_time(0.99, service_latency_seconds[5m])", - "rejections": [], - "report_and_materialization_ns": 1528568, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "service_latency_seconds" - } - } - }, - "hash": 3772802540453699306, - "id": 0, - "kind": "Scan", - "label": "Scan(service_latency_seconds)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 12277718898064577625, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Quantile, algorithm: Kll, params: Kll { k: 269 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Kll))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "Quantile { q: 0.99 }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(Quantile { q: 0.99 })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009966065608321138 - }, - "failure_probability": { - "op": "constant", - "value": 0.01 - }, - "metric": "rank", - "provenance": [ - { - "algorithm": "Kll", - "contract": "apache_datasketches_kll_empirical_99_a9b42755072b", - "kind": "sketch_readout", - "params": { - "Kll": { - "k": 269 - } - }, - "query": "Quantile { q: 0.99 }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - }, - { - "candidates": [ - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "measurement": { - "algorithm": "Cms", - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "error": { - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "max": null, - "mean": 2.3164860214890104, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "query": { - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 7.493697478991597, - "aae_top1": 4.0, - "aae_top10": 4.8, - "aae_top100": 6.49, - "accuracy_runs": 1, - "are_all": 2.3164860214890104, - "are_top1": 0.001122334455667789, - "are_top10": 0.007748825239549779, - "are_top100": 0.14834226869635583, - "l1_err": 7134.0, - "l2_err": 324.8969067258105, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 2.3164860214890104, - "relative_error_p99": 16.0 - }, - "kind": "point_frequency", - "value_type": "i64" - }, - "trials": 1 - }, - "id": "cms-zipf-seed42", - "measured_at_unix_seconds": 1788884961, - "metrics": { - "build_cpu_ns": null, - "disk_bytes": null, - "merge_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", - "samples": 5, - "stddev": 894.4271909999158, - "value": 3400.0 - }, - "peak_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 5440.0 - }, - "read_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", - "samples": 5, - "stddev": 1.150677641817575, - "value": 44.32773109243698 - }, - "retained_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 5440.0 - }, - "serialized_bytes": null, - "update_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", - "samples": 5, - "stddev": 2.121497112889859, - "value": 35.68 - } - }, - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant cms-regularpath-vector2d --library lib --config 'rows=5 cols=272' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "repetitions": 5, - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" - }, - "valid_until_unix_seconds": 1791476961 - }, - "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", - "status": "matched_configuration" - }, - "sketch": { - "algorithm": "Cms", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 0, - "rationale": "count realizes as a Cms sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - }, - { - "consumer_count": 1, - "families": [ - { - "family": "Sketch(SketchKind { category: Frequency, algorithm: CountSketch, params: CountSketch { width: 30000, depth: 83 } }, PerSubpopulationInstance)", - "is_sketch": true, - "offline_evidence": { - "measurement": { - "algorithm": "CountSketch", - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "error": { - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "max": null, - "mean": 0.0, - "metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "query": { - "accuracy_stddev": null, - "full_accuracy": { - "aae_all": 0.0, - "aae_top1": 0.0, - "aae_top10": 0.0, - "aae_top100": 0.0, - "accuracy_runs": 1, - "are_all": 0.0, - "are_top1": 0.0, - "are_top10": 0.0, - "are_top100": 0.0, - "l1_err": 0.0, - "l2_err": 0.0, - "probes": 952.0, - "probes_all": 952.0, - "probes_top1": 1.0, - "probes_top10": 10.0, - "probes_top100": 100.0, - "relative_error_mean": 0.0, - "relative_error_p99": 0.0 - }, - "kind": "point_frequency", - "value_type": "i64" - }, - "trials": 1 - }, - "id": "countsketch-zipf-seed42", - "measured_at_unix_seconds": 1788884981, - "metrics": { - "build_cpu_ns": null, - "disk_bytes": null, - "merge_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per binary merge", - "samples": 5, - "stddev": 190022.36710450685, - "value": 3211000.0 - }, - "peak_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 9960000.0 - }, - "read_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per point-frequency key lookup", - "samples": 5, - "stddev": 171.42715541514374, - "value": 3911.344537815126 - }, - "retained_bytes": { - "method": "requested allocation bytes using counting System allocator; construction + insertion; sketch alive; dataset excluded; not allocator-resident pages", - "samples": 5, - "stddev": 0.0, - "value": 9960000.0 - }, - "serialized_bytes": null, - "update_cpu_ns": { - "method": "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per input item", - "samples": 5, - "stddev": 12.136638743902814, - "value": 948.19 - } - }, - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - }, - "provenance": { - "command": "/mydata/sketch-bench-empirical-322/target/release/approxbench sketchbench --variant countsketch-regularpath-vector2d --library lib --config 'rows=83 cols=30000' --dataset zipf --size 20000 --cardinality 1000 --dtype i64 --seed 42 --runs 5 --warmup-runs 2 --operations insert,query,merge --metrics throughput,cpu,memory --zipf-s 1.1", - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "repetitions": 5, - "source_revision": "87f619e843fd2e4da784160d4e205a0d0d55f032" - }, - "valid_until_unix_seconds": 1791476981 - }, - "scope": "offline benchmark primitive; error/read query semantics are recorded in measurement.error.query, not validated against replay query", - "status": "matched_configuration" - }, - "sketch": { - "algorithm": "CountSketch", - "params": { - "CountSketch": { - "depth": 83, - "width": 30000 - } - } - } - } - ], - "group": 6, - "heuristic_score": 4.0, - "rank": 1, - "rationale": "count realizes as a CountSketch sketch — one of summary_candidates' alternatives for this intent (asap_aware_mapping::replacement::implementations_for_with)", - "score_unit": "dimensionless_not_cpu", - "strategy": "SketchAlgorithmStrategy", - "target_intent": "Count { accuracy: Epsilon(0.01) }" - } - ], - "coverage": "sketch_candidate", - "coverage_scope": "reachable_candidate_sites_not_whole_query_execution", - "estimated_end_to_end_cpu_savings": null, - "estimated_end_to_end_memory_savings": null, - "index": 2, - "lifecycle_plan": { - "deployments": [], - "evaluation_rate_per_second": null, - "expected_reads": 60.0, - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 1 - ], - "detail": { - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - }, - "hash": 12306718525742052945, - "id": 2, - "kind": "Aggregate", - "label": "Aggregate(1 measures)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 2 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(Aggregate)" - } - ], - "root": 0 - }, - "horizon_seconds": 3600.0, - "raw_recompute_total_cost": null, - "selected_raw_recompute": true, - "summary_total_cost": null, - "update_rate_per_second": null - }, - "query": "count_over_time(offline_frequency_metric[5m])", - "rejections": [], - "report_and_materialization_ns": 2479967, - "root_plan": { - "graph": { - "nodes": [ - { - "children": [], - "detail": { - "pre_asap_subgraph": { - "nodes": [ - { - "children": [], - "detail": { - "predicates": [], - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "offline_frequency_metric" - } - } - }, - "hash": 11537732429103736602, - "id": 0, - "kind": "Scan", - "label": "Scan(offline_frequency_metric)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - }, - { - "children": [ - 0 - ], - "detail": { - "range": { - "nanos": 0, - "secs": 300 - } - }, - "hash": 15919080798212461028, - "id": 1, - "kind": "TimeRange", - "label": "TimeRange(300s)", - "schema": { - "closed": false, - "columns": [ - { - "dtype": "timestamp", - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": "float64", - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - } - } - ], - "root": 1 - } - }, - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "id": 0, - "kind": "KeepPreAsap", - "label": "KeepPreAsap(TimeRange)" - }, - { - "children": [ - 0 - ], - "detail": { - "family": "Sketch(SketchKind { category: Frequency, algorithm: Cms, params: Cms { width: 272, depth: 5 } }, PerSubpopulationInstance)", - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - } - }, - "reduction": "PerEntity" - }, - "id": 1, - "kind": "SummaryAgg", - "label": "SummaryAgg(Sketch(Cms))" - }, - { - "children": [ - 1 - ], - "detail": { - "query": "PointCount { key: SampleValue, value: None }" - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - }, - "id": 2, - "kind": "SummaryEstimate", - "label": "SummaryEstimate(PointCount { key: SampleValue, value: None })" - } - ], - "root": 2 - }, - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_readout", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "KeepPreAsap" - } - ] - }, - "input_index": 0, - "kind": "child_guarantee" - }, - { - "kind": "composition_step", - "operator": { - "op": "approximate_aggregate" - }, - "rule": "exact_input" - }, - { - "kind": "accuracy_target", - "target": { - "Epsilon": 0.01 - } - } - ] - } - }, - "unknown_cost_reason": "complete raw scan, residual operators, grouping cardinalities and deployment costs are unavailable" - } - ], - "query_count": 3, - "search_ns": 907683, - "selection_ns": 272232 - } - ], - "source": "local supplemental examples, not upstream o11y queries" - } - ], - "empirical_artifact": { - "benchmark_version": "sketch-bench@87f619e843fd2e4da784160d4e205a0d0d55f032; adapter-v1", - "model_version": "empirical-update-cpu-v1", - "schema_version": 1 - }, - "empirical_context": { - "distribution": { - "distinct_count": 952, - "family": "zipf", - "id": "zipf-n20000-c1000-seed42", - "parameters": { - "kind": "zipf", - "population_size": 1000, - "seed": 42, - "skewness": 1.1 - }, - "sample_count": 20000 - }, - "environment": { - "cpu": "Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz", - "id": "c9590114bad98348", - "implementation": "asap_sketchlib RegularPath Vector2D", - "implementation_version": "asap_sketchlib 0.2.2", - "os": "Linux-5.15.0-177-generic-x86_64-with-glibc2.35", - "runtime": "rustc 1.97.1 (8bab26f4f 2026-07-14); release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1" - }, - "now_unix_seconds": 1788884981 - }, - "execution_scope": "offline_planner_search_selection_and_lifecycle_no_data_plane", - "schema_version": 1, - "vendored_fixture_source": { - "note": "existing 27-query local fixture; upstream revision and scenario data were not provided", - "repository": "https://github.com/grafana/o11y-bench", - "upstream_commit": null, - "vendored_snapshot_date": "2026-07-17" - } -} diff --git a/tools/empirical-bench/run.py b/tools/empirical-bench/run.py deleted file mode 100644 index cd56d756..00000000 --- a/tools/empirical-bench/run.py +++ /dev/null @@ -1,367 +0,0 @@ -#!/usr/bin/env python3 -"""Run the real sketch-bench CLI and export offline planner evidence (stdlib only).""" -import argparse -import datetime -import hashlib -import json -import math -import os -from pathlib import Path -import platform -import shlex -import statistics -import subprocess -import tempfile - - -BUILD_PROVENANCE = { - "runtime_field_status": "declared build preconditions, not introspected from the executable", - "compiler_status": "rustc --version observed on driver host; executable compiler not independently verified", - "required_build": "run cargo build --release --locked -p aqpbm-cli from the pinned sketch-bench directory with default features", - "declared_settings": "release; repository target-cpu=native; default jemalloc", - "verified_execution_setting": "driver sets POLARS_MAX_THREADS=1", - "binary_identity": "SHA-256 recorded; digest identifies executable but does not verify build settings", -} - - -def command(argv, **kwargs): - return subprocess.check_output(argv, text=True, **kwargs).strip() - - -def measurement(values): - if not values or any(not math.isfinite(x) or x < 0 for x in values): - raise ValueError("invalid or missing measurement") - return {"value": statistics.mean(values), - "stddev": statistics.stdev(values) if len(values) > 1 else None, - "samples": len(values)} - - -def cpu_per_op(row, op): - """Recover each run's work from paired rate and elapsed samples, as upstream does.""" - rate = row.get(op + ("_folds_per_sec" if op == "merge" else "_throughput_items_per_sec")) - cpu = row.get(op + "_cpu_time_ms") - wall = row.get(op + "_wall_time_ms") - if not rate or not cpu or not wall: - return None - samples = [rate["samples"], wall["samples"], cpu["user_ms"]["samples"], cpu["sys_ms"]["samples"]] - if len({len(x) for x in samples}) != 1: - raise ValueError("unaligned CPU/rate/time samples") - values = [] - for r, elapsed, user, system in zip(*samples): - work = r * elapsed / 1000 - if work <= 0: - raise ValueError("zero benchmark work") - values.append((user + system) * 1_000_000 / work) - result = measurement(values) - result["method"] = "mean of paired run (process user+system CPU ns)/(throughput*wall seconds); per " + ("binary merge" if op == "merge" else "input item" if op == "insert" else "point-frequency key lookup") - return result - - -def cpu_batch(row, op): - cpu = row.get(op + "_cpu_time_ms") - if not cpu: - return None - return measurement([(u + s) * 1_000_000 for u, s in - zip(cpu["user_ms"]["samples"], cpu["sys_ms"]["samples"])]) - - -def export(raw, manifest, operation_reports, memory_rows, resource_rows=None): - records, baselines = [], [] - if not (len(raw) == len(manifest["invocations"]) == len(operation_reports)): - raise ValueError("misaligned invocation reports") - for row, invocation, operations in zip(raw, manifest["invocations"], operation_reports): - if row["schema_version"] != 5: - raise ValueError("adapter requires sketch-bench schema 5") - accuracy = row["query_accuracy"] - resource = next((r for r in (resource_rows or []) if r["sketch"] == row["sketch"] - and r["impl"] == row["impl"] and r["sketch_config"] == row["sketch_config"] - and r["workload"] == row["workload"]), None) - if resource_rows is not None and (resource is None or "phases" not in resource): - raise ValueError("complete comparison requires matched disjoint live-state phase measurements for every record") - def phase_metric(phase): - return (dict(measurement(resource["phases"][phase + "_cpu_ns_samples"]), method=resource["phases"]["method"]) - if resource and resource.get("phases") else None) - shape = row["workload"]["synthetic"]["description"] - distribution = {"id": invocation["distribution_id"], - "family": invocation["distribution"], - "sample_count": shape["row_num"], - "distinct_count": int(accuracy["probes_all"]), - "parameters": shape["column_spec"][0]["distribution"]} - if invocation["algorithm"] == "Exact": - exact_memory = next((m for m in memory_rows if m.get("impl") == "polars" and m["workload"] == row["workload"]), None) - baselines.append({"distribution": distribution, "implementation": "polars exact group_by + HashMap", - "insert_cpu_ns_per_item": phase_metric("update") or cpu_per_op(row, "insert"), - "prepare_cpu_ns_per_dataset": phase_metric("prepare") or cpu_batch(row, "prepare"), - "read_cpu_ns_per_key": phase_metric("read") or cpu_per_op(row, "query"), - "retained_bytes": max(r["bench"]["memory_bytes"] for r in operations - if r["bench"].get("operation") == "query"), - "retained_bytes_method": "upstream prepared-query memory_bytes formula: buffer capacity plus HashMap capacity footprint; not measured allocated heap or peak", - "accuracy": accuracy}) - baselines[-1]["empty_build_cpu_ns"] = (dict(measurement(resource["build_cpu_ns_samples"]), method=resource["build_method"]) - if resource else None) - if exact_memory and all(delta == 0 for delta in exact_memory["cleanup_deltas"]): - baselines[-1]["retained_heap_bytes"] = dict(measurement([s[0] for s in exact_memory["samples"]]), method=exact_memory["method"]) - baselines[-1]["peak_heap_bytes"] = dict(measurement([s[1] for s in exact_memory["samples"]]), method=exact_memory["method"]) - continue - algorithm = invocation["algorithm"] - memory = next(m for m in memory_rows if m["sketch"] == row["sketch"] and m["workload"] == row["workload"] - and (m.get("sketch_config", row["sketch_config"]) == row["sketch_config"])) - params = row["sketch_config"]["params"] - timestamp = row["insert_timestamp"] - if not timestamp.endswith("Z"): - raise ValueError("expected upstream UTC timestamp") - measured = int(datetime.datetime.fromisoformat(timestamp[:19] + "+00:00").timestamp()) - environment = dict(manifest["environment"]) - environment["implementation"] = "asap_sketchlib RegularPath Vector2D" - # The algorithm distinguishes families; storage/hash path must also match. - environment["id"] = hashlib.sha256(json.dumps(environment, sort_keys=True).encode()).hexdigest()[:16] - records.append({"id": invocation["id"], "algorithm": algorithm, - "params": {algorithm: {"width": params["cols"], "depth": params["rows"]}}, - "distribution": distribution, "environment": environment, - "measured_at_unix_seconds": measured, - "valid_until_unix_seconds": measured + 30 * 86400, - "provenance": {"command": shlex.join(invocation["argv"]), - "dataset": "deterministic synthetic i64 frequency stream, seed 42", - "source_revision": manifest["source_revision"], - "repetitions": row["runs"]}, - "metrics": {"build_cpu_ns": (dict(measurement(resource["build_cpu_ns_samples"]), method=resource["build_method"]) - if resource else None), - "update_cpu_ns": phase_metric("update") or cpu_per_op(row, "insert"), - "merge_cpu_ns": phase_metric("merge") or cpu_per_op(row, "merge"), - "read_cpu_ns": phase_metric("read") or cpu_per_op(row, "query"), - "retained_bytes": dict(measurement([float(s[0]) for s in memory["samples"]]), method=memory["method"]), - "peak_bytes": dict(measurement([float(s[1]) for s in memory["samples"]]), method=memory["method"]), - "serialized_bytes": (dict(measurement([resource["serialized_bytes"]]), method="actual serialize_to_bytes MsgPack length; estimate-equivalent roundtrip verified for every input key") if resource else None), - "disk_bytes": (dict(measurement([resource["disk_bytes"]]), method=resource["disk_method"]) if resource else None)}, - "error": {"metric": "mean_absolute_relative_frequency_error_all_distinct_keys", - "mean": accuracy["are_all"], "max": None, - "trials": int(accuracy.get("accuracy_runs", 1)), - "ground_truth_method": "exact offline HashMap counts; every distinct key probed", - "query": {"kind": "point_frequency", "value_type": "i64", - "accuracy_stddev": accuracy.get("are_all_stddev"), - "full_accuracy": accuracy}}}) - return {"schema_version": 1, - "benchmark_version": "sketch-bench@" + manifest["source_revision"] + ("; adapter-v2-disjoint" if resource_rows else "; adapter-v1"), - "model_version": "empirical-update-cpu-v1", "records": records}, baselines - - -def comparison_artifact(artifact, baselines, manifest): - query = {"kind": "point_frequency", "value_type": "i64", "probe_set": "all_distinct_keys"} - exact_records = [] - for baseline in baselines: - if baseline["empty_build_cpu_ns"] is None: - continue - reference = next(r for r in artifact["records"] if r["distribution"] == baseline["distribution"]) - environment = dict(manifest["environment"]) - environment["implementation"] = "polars group_by + std HashMap" - environment["implementation_version"] = "polars 0.46.0" - environment["id"] = hashlib.sha256(json.dumps(environment, sort_keys=True).encode()).hexdigest()[:16] - invocation = next(i for i in manifest["invocations"] if i["algorithm"] == "Exact" - and i["distribution_id"] == baseline["distribution"]["id"]) - exact_records.append({"id": invocation["id"], "distribution": baseline["distribution"], - "environment": environment, "query": query, - "measured_at_unix_seconds": reference["measured_at_unix_seconds"], - "valid_until_unix_seconds": reference["valid_until_unix_seconds"], - "provenance": {"command": shlex.join(invocation["argv"]), - "dataset": "deterministic synthetic i64 frequency stream, seed 42; exact zero-error comparison verified offline", - "source_revision": manifest["source_revision"], "repetitions": 5}, - "metrics": {"empty_build_cpu_ns": baseline["empty_build_cpu_ns"], - "update_cpu_ns": baseline["insert_cpu_ns_per_item"], - "prepare_cpu_ns": baseline["prepare_cpu_ns_per_dataset"], - "read_cpu_ns": baseline["read_cpu_ns_per_key"], - "retained_bytes": baseline.get("retained_heap_bytes") or dict(measurement([baseline["retained_bytes"]]), method=baseline["retained_bytes_method"]), - "peak_bytes": baseline.get("peak_heap_bytes")}}) - return {"schema_version": 1, "timing_contract": "disjoint_live_state_v1", "sketch_evidence": artifact, - "query_bindings": [{"record_id": r["id"], "query": query} for r in artifact["records"]], - "exact_records": exact_records} - - -def refresh_memory(bench_repo, raw_path, memory_path): - deps = bench_repo.resolve() / "target/release/deps" - with tempfile.TemporaryDirectory(prefix="asap-memory-probe-") as temporary: - executable = str(Path(temporary) / "memory-probe") - argv = ["rustc", "--edition=2021", "-C", "opt-level=3", "-C", "panic=abort", "-C", "target-cpu=native", - "-L", f"dependency={deps}", str(Path(__file__).with_name("memory_probe.rs")), "-o", executable] - for name in ["asap_sketchlib", "aqpbm_datagen", "serde_json", "sketch_bench"]: - candidates = list(deps.glob(f"lib{name}-*.rlib")) - if len(candidates) != 1: - raise ValueError(f"expected one pinned release library for {name}, got {len(candidates)}") - argv += ["--extern", f"{name}={candidates[0]}"] - for pattern in ["*/out", "*/out/lib"]: - for native in (bench_repo.resolve() / "target/release/build").glob(pattern): - argv += ["-L", f"native={native}"] - subprocess.check_call(argv) - memory_path.write_text(command([executable, str(raw_path)], env=dict(os.environ, POLARS_MAX_THREADS="1")) + "\n") - return {"source_sha256": hashlib.sha256(Path(__file__).with_name("memory_probe.rs").read_bytes()).hexdigest(), - "compile_argv": argv, - "allocator": "System + requested-byte tracking; separate from uninstrumented jemalloc CPU measurements"} - - -def main(): - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--bench-repo", required=True, type=Path) - parser.add_argument("--output", required=True, type=Path) - parser.add_argument("--size", type=int, default=20000) - parser.add_argument("--cardinality", type=int, default=1000) - parser.add_argument("--runs", type=int, default=5) - parser.add_argument("--sweep", action="store_true", help="measure three widths per frequency family") - parser.add_argument("--export-only", action="store_true") - parser.add_argument("--refresh-memory", action="store_true", help="with --export-only, remeasure heap without rerunning CPU timings") - parser.add_argument("--resume", action="store_true", help="continue a partially completed run with identical parameters") - args = parser.parse_args() - if args.refresh_memory and not args.export_only: - parser.error("--refresh-memory requires --export-only") - args.output.mkdir(parents=True, exist_ok=True) - manifest_path = args.output / "manifest.json" - raw_path = args.output / "raw.json" - operations_path = args.output / "operation-reports.json" - if args.export_only: - manifest, raw = json.loads(manifest_path.read_text()), json.loads(raw_path.read_text()) - operation_reports = json.loads(operations_path.read_text()) - else: - if (raw_path.exists() or manifest_path.exists()) and not args.resume: - parser.error("output already contains a run; use a new directory or --export-only") - repo = args.bench_repo.resolve() - if 'name = "asap_sketchlib"\nversion = "0.2.2"' not in (repo / "Cargo.lock").read_text(): - parser.error("adapter is validated with asap_sketchlib 0.2.2; do not relabel another version") - binary = repo / "target/release/approxbench" - cpu = next((line.split(":", 1)[1].strip() for line in Path("/proc/cpuinfo").read_text().splitlines() - if line.startswith("model name")), platform.processor()) - manifest = {"source_revision": command(["git", "rev-parse", "HEAD"], cwd=repo), - "source_dirty": bool(command(["git", "status", "--porcelain"], cwd=repo)), - "environment": {"cpu": cpu, "os": platform.platform(), - "runtime": command(["rustc", "--version"]) + "; release; target-cpu=native; jemalloc; POLARS_MAX_THREADS=1", - "implementation_version": "asap_sketchlib 0.2.2"}, - "binary_sha256": hashlib.sha256(binary.read_bytes()).hexdigest(), - "runtime_provenance": BUILD_PROVENANCE, - "invocations": []} - raw, operation_reports = [], [] - if args.resume: - previous = json.loads(manifest_path.read_text()) - if previous["binary_sha256"] != manifest["binary_sha256"] or previous["environment"] != manifest["environment"]: - parser.error("resume requires the same binary and environment") - manifest, raw = previous, json.loads(raw_path.read_text()) - operation_reports = json.loads(operations_path.read_text()) - for invocation in manifest["invocations"]: - argv = invocation["argv"] - if any(argv[argv.index(flag) + 1] != str(value) for flag, value in - [("--size", args.size), ("--cardinality", args.cardinality), ("--runs", args.runs)]): - parser.error("resume requires the same size, cardinality, and runs") - env = dict(os.environ, POLARS_MAX_THREADS="1") - for distribution in ["uniform", "zipf"]: - targets = [ - ("Cms", "cms-regularpath-vector2d", "lib", 5, 272), - ("CountSketch", "countsketch-regularpath-vector2d", "lib", 83, 30000), - ("Exact", "cms", "polars", 5, 272)] - if args.sweep: - targets += [("Cms", "cms-regularpath-vector2d", "lib", 5, width) for width in [2720, 27200, 512, 4096, 32768]] - targets += [("CountSketch", "countsketch-regularpath-vector2d", "lib", 83, width) for width in [300, 3000]] - for algorithm, variant, library, rows, cols in targets: - record_id = f"{algorithm.lower()}-{distribution}-seed42" + (f"-w{cols}-d{rows}" if args.sweep else "") - if any(i["id"] == record_id for i in manifest["invocations"]): - continue - argv = [str(binary), "sketchbench", "--variant", variant, "--library", library, - "--config", f"rows={rows} cols={cols}", "--dataset", distribution, - "--size", str(args.size), "--cardinality", str(args.cardinality), - "--dtype", "i64", "--seed", "42", "--runs", str(args.runs), - "--warmup-runs", "2", "--operations", - "insert,query" if algorithm == "Exact" else "insert,query,merge", - "--metrics", "throughput,cpu,memory"] - if distribution == "zipf": - argv += ["--zipf-s", "1.1"] - print(shlex.join(argv), flush=True) - output = command(argv, env=env) - accuracy_argv = list(argv) - accuracy_argv[accuracy_argv.index("--operations") + 1] = "query" - accuracy_argv[accuracy_argv.index("--metrics") + 1] = "accuracy" - output += "\n" + command(accuracy_argv, env=env) - prepare_argv = None - if algorithm == "Exact": - prepare_argv = list(argv) - prepare_argv[prepare_argv.index("--operations") + 1] = "prepare" - prepare_argv[prepare_argv.index("--metrics") + 1] = "latency,cpu,memory" - output += "\n" + command(prepare_argv, env=env) - operations = [json.loads(line) for line in output.splitlines() if line.strip()] - row = json.loads(command([str(binary), "flatten"], input=output, env=env)) - raw.append(row) - operation_reports.append(operations) - manifest["invocations"].append({"id": record_id, - "distribution_id": f"{distribution}-n{args.size}-c{args.cardinality}-seed42", - "distribution": distribution, "algorithm": algorithm, "argv": argv, - "accuracy_argv": accuracy_argv, "prepare_argv": prepare_argv}) - raw_path.write_text(json.dumps(raw, indent=2) + "\n") - manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") - operations_path.write_text(json.dumps(operation_reports, indent=2) + "\n") - memory_path = args.output / "memory-probe.json" - resources_path = args.output / "resource-probe.json" - if not args.export_only: - # Older partial runs may lack prepare: CPU/memory alone select no upstream timing pass. - for index, (row, invocation) in enumerate(zip(raw, manifest["invocations"])): - if invocation["algorithm"] == "Exact" and not row.get("prepare_cpu_time_ms"): - prepare_argv = list(invocation["argv"]) - prepare_argv[prepare_argv.index("--operations") + 1] = "prepare" - prepare_argv[prepare_argv.index("--metrics") + 1] = "latency,cpu,memory" - output = command(prepare_argv, env=env) - operation_reports[index].extend(json.loads(line) for line in output.splitlines() if line.strip()) - raw[index] = json.loads(command([str(binary), "flatten"], - input="\n".join(json.dumps(r) for r in operation_reports[index]), env=env)) - invocation["prepare_argv"] = prepare_argv - raw_path.write_text(json.dumps(raw, indent=2) + "\n") - operations_path.write_text(json.dumps(operation_reports, indent=2) + "\n") - deps = args.bench_repo.resolve() / "target/release/deps" - manifest["memory_probe"] = refresh_memory(args.bench_repo, raw_path, memory_path) - with tempfile.TemporaryDirectory(prefix="asap-resource-probe-") as temporary: - executable = str(Path(temporary) / "resource-probe") - argv = ["rustc", "--edition=2021", "-C", "opt-level=3", "-C", "panic=abort", "-C", "target-cpu=native", - "-L", f"dependency={deps}", str(Path(__file__).with_name("resource_probe.rs")), "-o", executable] - for name in ["asap_sketchlib", "aqpbm_datagen", "serde_json", "tikv_jemallocator", "sketch_bench"]: - candidates = list(deps.glob(f"lib{name}-*.rlib")) - if len(candidates) != 1: - raise ValueError(f"expected one pinned release library for {name}, got {len(candidates)}") - argv += ["--extern", f"{name}={candidates[0]}"] - for native in (args.bench_repo.resolve() / "target/release/build").glob("tikv-jemalloc-sys-*/out/lib"): - argv += ["-L", f"native={native}"] - for native in (args.bench_repo.resolve() / "target/release/build").glob("*/out"): - argv += ["-L", f"native={native}"] - subprocess.check_call(argv) - resources_path.write_text(command([executable, str(raw_path), temporary], env=env) + "\n") - manifest["resource_probe"] = {"source_sha256": hashlib.sha256(Path(__file__).with_name("resource_probe.rs").read_bytes()).hexdigest(), - "compile_argv": argv, "allocator": "jemalloc", "disk_filesystem_path": tempfile.gettempdir()} - manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") - if args.refresh_memory: - if hashlib.sha256((args.bench_repo.resolve() / "target/release/approxbench").read_bytes()).hexdigest() != manifest["binary_sha256"]: - parser.error("memory refresh requires the original benchmark binary") - manifest["memory_probe"] = refresh_memory(args.bench_repo, raw_path, memory_path) - manifest["runtime_provenance"] = BUILD_PROVENANCE - manifest_path.write_text(json.dumps(manifest, indent=2) + "\n") - artifact, baselines = export(raw, manifest, operation_reports, json.loads(memory_path.read_text()), - json.loads(resources_path.read_text()) if resources_path.exists() else None) - (args.output / "planner-evidence.json").write_text(json.dumps(artifact, indent=2) + "\n") - (args.output / "exact-baselines.json").write_text(json.dumps(baselines, indent=2) + "\n") - if resources_path.exists(): - comparison = comparison_artifact(artifact, baselines, manifest) - (args.output / "comparison-evidence.json").write_text(json.dumps(comparison, indent=2) + "\n") - for exact in comparison["exact_records"]: - row = next(r for r in artifact["records"] if r["distribution"] == exact["distribution"]) - for budget, suffix in [(0.01, "001"), (0.05, "005")]: - request = {"context": {"distribution": row["distribution"], "environment": row["environment"], - "now_unix_seconds": max(r["measured_at_unix_seconds"] for r in artifact["records"])}, - "exact_environment": exact["environment"], "query": exact["query"], - "accuracy": {"metric": row["error"]["metric"], "max_observed_mean": budget, "minimum_trials": 1}, - "workload": {"input_items_per_state": row["distribution"]["sample_count"], - "reads_per_state": 1000, "merges_per_state": 0, "state_instances": 1, "horizon_seconds": 300.0}, - "weights": {"cpu_ns_weight": 1.0, "retained_byte_seconds_weight": 0.0}, "formal_minimums": None} - (args.output / ("request-" + row["distribution"]["family"] + "-are" + suffix + ".json")).write_text(json.dumps(request, indent=2) + "\n") - request["accuracy"]["max_observed_mean"] = 0.01 - request["weights"]["retained_byte_seconds_weight"] = 0.01 - request["formal_minimums"] = [{"algorithm": "Cms", "params": {"Cms": {"width": 512, "depth": 5}}}] - (args.output / ("request-" + row["distribution"]["family"] + "-memory-weighted.json")).write_text(json.dumps(request, indent=2) + "\n") - for row in artifact["records"]: - context = {"distribution": row["distribution"], "environment": row["environment"], - "now_unix_seconds": max(r["measured_at_unix_seconds"] for r in artifact["records"])} - (args.output / ("context-" + row["distribution"]["family"] + ".json")).write_text(json.dumps(context, indent=2) + "\n") - print(f"Exported {len(artifact['records'])} sketch records and {len(baselines)} exact baselines.") - - -if __name__ == "__main__": - main() diff --git a/tools/empirical-bench/test_export.py b/tools/empirical-bench/test_export.py deleted file mode 100644 index ab5389b5..00000000 --- a/tools/empirical-bench/test_export.py +++ /dev/null @@ -1,51 +0,0 @@ -"""Unit checks for measurement normalization, independent of running the benchmark.""" -import unittest - -from run import cpu_per_op, export - - -class NormalizationTests(unittest.TestCase): - def test_complete_comparison_rejects_missing_live_phase_measurements(self): - """An old constructor-only probe cannot label consuming-wrapper CPU as disjoint.""" - row = {"schema_version": 5, "query_accuracy": {}, "sketch": "cms", "impl": "lib", - "sketch_config": {}, "workload": {}} - manifest = {"invocations": [{}]} - for resources in [[], [dict(row, build_cpu_ns_samples=[1.0])]]: - with self.subTest(resources=resources): - with self.assertRaisesRegex(ValueError, "disjoint live-state"): - export([row], manifest, [[]], [], resources) - - def test_partial_report_files_are_rejected_before_pairing(self): - """A truncated report file must fail rather than silently lose invocations.""" - for raw, invocations, operations in [([{}], [], []), ([], [{}], []), ([], [], [{}])]: - with self.subTest(lengths=(len(raw), len(invocations), len(operations))): - with self.assertRaisesRegex(ValueError, "misaligned invocation reports"): - export(raw, {"invocations": invocations}, operations, []) - - def test_cpu_normalizes_paired_work_not_wall_time(self): - """Different wall durations for identical work must not change the denominator.""" - row = {"query_throughput_items_per_sec": {"samples": [2000, 1000]}, - "query_wall_time_ms": {"samples": [100, 200]}, - "query_cpu_time_ms": {"user_ms": {"samples": [20, 20]}, - "sys_ms": {"samples": [10, 10]}}} - result = cpu_per_op(row, "query") - self.assertEqual(result["value"], 150000) - self.assertEqual(result["stddev"], 0) - self.assertEqual(result["samples"], 2) - - def test_unmeasured_cpu_is_not_zero(self): - """Missing CPU evidence stays absent instead of looking like free work.""" - self.assertIsNone(cpu_per_op({}, "query")) - - def test_misaligned_samples_rejected(self): - """CPU and rates from different run populations cannot be paired.""" - row = {"insert_throughput_items_per_sec": {"samples": [2000, 1000]}, - "insert_wall_time_ms": {"samples": [100]}, - "insert_cpu_time_ms": {"user_ms": {"samples": [20, 20]}, - "sys_ms": {"samples": [10, 10]}}} - with self.assertRaises(ValueError): - cpu_per_op(row, "insert") - - -if __name__ == "__main__": - unittest.main() From 95d4781b90c3123fb7d0d1a80b43199ef2e58d7d Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 11:35:27 -0600 Subject: [PATCH 7/9] docs: decouple core evidence contract from benchmark tooling --- docs/developer_docs/offline-sketch-evidence.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer_docs/offline-sketch-evidence.md b/docs/developer_docs/offline-sketch-evidence.md index 9e0fad60..9fb814c4 100644 --- a/docs/developer_docs/offline-sketch-evidence.md +++ b/docs/developer_docs/offline-sketch-evidence.md @@ -4,8 +4,8 @@ This document is for developers integrating sketch-bench with the planner. The Rust schema is `asap_aware_mapping::empirical_cost::EvidenceArtifact`; its JSON schema version is `1`. Required artifact-level `benchmark_version` and `model_version` identify the producer and cost interpretation independently of -the serialization schema. The benchmark adapter in `tools/empirical-bench` produces -artifacts from actual offline runs. +the serialization schema. Producers export offline benchmark measurements using +this contract; benchmark tooling is delivered separately from the core provider. The checked-in [JSON Schema](offline-sketch-evidence.schema.json) describes the wire format. `crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.json` From bce917943584e9a553afb1b113f2133de50eda5d Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 12:18:46 -0600 Subject: [PATCH 8/9] refactor(cost): share physical resource and CPU definitions --- .../asap-aware-mapping/src/analytical_cost.rs | 388 +++++++++++------- .../src/empirical_comparison.rs | 184 ++++++--- .../asap-aware-mapping/src/empirical_cost.rs | 171 +++++--- .../src/empirical_resources.rs | 202 +++++++++ crates/asap-aware-mapping/src/lib.rs | 1 + .../src/query_physical_lowering.rs | 10 +- .../src/summary_maintenance_cost/estimator.rs | 16 +- .../src/summary_maintenance_cost/model.rs | 50 +-- crates/devtools/src/bin/dag_export.rs | 6 +- crates/types/src/lib.rs | 1 + crates/types/src/resources.rs | 131 ++++++ .../offline-comparison-evidence.schema.json | 45 ++ .../developer_docs/offline-sketch-evidence.md | 44 +- .../offline-sketch-evidence.schema.json | 23 ++ 14 files changed, 978 insertions(+), 294 deletions(-) create mode 100644 crates/asap-aware-mapping/src/empirical_resources.rs create mode 100644 crates/types/src/resources.rs diff --git a/crates/asap-aware-mapping/src/analytical_cost.rs b/crates/asap-aware-mapping/src/analytical_cost.rs index 072cf414..63b8edf3 100644 --- a/crates/asap-aware-mapping/src/analytical_cost.rs +++ b/crates/asap-aware-mapping/src/analytical_cost.rs @@ -8,6 +8,7 @@ use std::collections::{HashMap, HashSet}; use asap_types::post_asap::{SketchAlgorithm, SketchParams}; +pub use asap_types::resources::ModeledCpu; use asap_types::workload::DataArrival; use serde::{Deserialize, Serialize}; @@ -54,11 +55,72 @@ impl ResourceCalibration { } } +/// An analytical estimate requires CPU work, peak memory, and scanned bytes. +/// The shared resource container keeps other dimensions explicitly unknown. #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] +#[serde(from = "ResourceEstimateWire", into = "ResourceEstimateWire")] pub struct ResourceEstimate { - pub cpu_ops: f64, - pub peak_memory_bytes: u64, - pub scan_bytes: u64, + resources: asap_types::resources::PhysicalResources, +} + +// Keep the established three-field JSON format. Required fields make a missing +// analytical quantity an import error instead of silently supplying zero. +#[derive(Serialize, Deserialize)] +struct ResourceEstimateWire { + cpu_ops: f64, + peak_memory_bytes: u64, + scan_bytes: u64, +} + +impl From for ResourceEstimate { + fn from(wire: ResourceEstimateWire) -> Self { + Self::new(wire.cpu_ops, wire.peak_memory_bytes, wire.scan_bytes) + } +} + +impl From for ResourceEstimateWire { + fn from(estimate: ResourceEstimate) -> Self { + Self { + cpu_ops: estimate.cpu_ops(), + peak_memory_bytes: estimate.peak_memory_bytes(), + scan_bytes: estimate.scan_bytes(), + } + } +} + +impl ResourceEstimate { + pub const fn new(cpu_ops: f64, peak_memory_bytes: u64, scan_bytes: u64) -> Self { + Self { + resources: asap_types::resources::PhysicalResources { + cpu: ModeledCpu { cpu_ops }, + peak_memory_bytes: Some(peak_memory_bytes), + retained_memory_bytes: None, + scan_bytes: Some(scan_bytes), + serialized_bytes: None, + disk_bytes: None, + }, + } + } + + pub fn cpu_ops(&self) -> f64 { + self.resources.cpu.cpu_ops + } + + pub fn peak_memory_bytes(&self) -> u64 { + self.resources + .peak_memory_bytes + .expect("analytical peak memory is required by construction") + } + + pub fn scan_bytes(&self) -> u64 { + self.resources + .scan_bytes + .expect("analytical scan bytes are required by construction") + } + + pub fn resources(&self) -> &asap_types::resources::PhysicalResources { + &self.resources + } } /// Physical operator classes used to expose CPU, memory, and disk formulas @@ -435,18 +497,18 @@ pub fn estimate_physical_dag( ExecutionMultiplicity::Once => 1, ExecutionMultiplicity::PerEvaluation => evaluation_count, }; - cpu_ops += local.cpu_ops * executions as f64; + cpu_ops += local.cpu_ops() * executions as f64; scan_bytes = scan_bytes .checked_add( local - .scan_bytes + .scan_bytes() .checked_mul(executions) .ok_or(AnalyticalCostError::Overflow)?, ) .ok_or(AnalyticalCostError::Overflow)?; peak_memory_bytes = peak_memory_bytes.max( live_bytes - .checked_add(local.peak_memory_bytes) + .checked_add(local.peak_memory_bytes()) .and_then(|bytes| bytes.checked_add(node.output_buffer_bytes)) .ok_or(AnalyticalCostError::Overflow)?, ); @@ -481,11 +543,11 @@ pub fn estimate_physical_dag( if !cpu_ops.is_finite() { return Err(AnalyticalCostError::Overflow); } - Ok(ResourceEstimate { + Ok(ResourceEstimate::new( cpu_ops, peak_memory_bytes, scan_bytes, - }) + )) } fn validate_operator_statistics( @@ -746,11 +808,7 @@ fn partitioned_order_estimate( if !cpu_ops.is_finite() { return Err(AnalyticalCostError::Overflow); } - Ok(ResourceEstimate { - cpu_ops, - peak_memory_bytes, - scan_bytes: 0, - }) + Ok(ResourceEstimate::new(cpu_ops, peak_memory_bytes, 0)) } fn validate_partitioning( @@ -835,11 +893,11 @@ pub fn estimate_operator( "PromQL scalar leaf must emit one scalar row per evaluation step", )); } - return Ok(ResourceEstimate { - cpu_ops: output.rows as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }); + return Ok(ResourceEstimate::new( + output.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + )); } let left = input(0)?; let estimate = match (operator, &statistics) { @@ -848,36 +906,36 @@ pub fn estimate_operator( OperatorStatistics::Scan { source_read_bytes, .. }, - ) => ResourceEstimate { - cpu_ops: left.rows as f64, - peak_memory_bytes: per_row_width(left.rows, left.bytes)?, - scan_bytes: *source_read_bytes, - }, + ) => ResourceEstimate::new( + left.rows as f64, + per_row_width(left.rows, left.bytes)?, + *source_read_bytes, + ), ( PhysicalOperator::Filter { predicate_operations_per_row, }, _, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, predicate_operations_per_row)?, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, + ) => ResourceEstimate::new( + checked_cpu_product(left.rows, predicate_operations_per_row)?, + per_row_width(output.rows, output.bytes)?, + 0, + ), ( PhysicalOperator::Project { expression_operations_per_row, }, _, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, expression_operations_per_row)?, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, - (PhysicalOperator::PassThrough, _) => ResourceEstimate { - cpu_ops: left.rows as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, + ) => ResourceEstimate::new( + checked_cpu_product(left.rows, expression_operations_per_row)?, + per_row_width(output.rows, output.bytes)?, + 0, + ), + (PhysicalOperator::PassThrough, _) => ResourceEstimate::new( + left.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ), ( PhysicalOperator::HashAggregate { grouping_key_count, @@ -889,22 +947,22 @@ pub fn estimate_operator( accumulator_bytes_per_group, .. }, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product( + ) => ResourceEstimate::new( + checked_cpu_product( left.rows, grouping_key_count .checked_add(accumulator_count) .ok_or(AnalyticalCostError::Overflow)?, )?, - peak_memory_bytes: checked_bytes(&[ + checked_bytes(&[ *group_count, key_bytes .checked_add(*accumulator_bytes_per_group) .and_then(|bytes| bytes.checked_add(16)) .ok_or(AnalyticalCostError::Overflow)?, ])?, - scan_bytes: 0, - }, + 0, + ), ( PhysicalOperator::HashDeduplicate { key_count }, OperatorStatistics::HashDeduplicate { @@ -912,16 +970,16 @@ pub fn estimate_operator( key_bytes, .. }, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, key_count)?, - peak_memory_bytes: checked_bytes(&[ + ) => ResourceEstimate::new( + checked_cpu_product(left.rows, key_count)?, + checked_bytes(&[ *distinct_key_count, key_bytes .checked_add(16) .ok_or(AnalyticalCostError::Overflow)?, ])?, - scan_bytes: 0, - }, + 0, + ), ( PhysicalOperator::InMemoryComparisonSort { ordering_key_count, .. @@ -958,16 +1016,13 @@ pub fn estimate_operator( .checked_add(offset) .ok_or(AnalyticalCostError::Overflow)?; let heap_rows = heap_capacity.min(left.rows); - ResourceEstimate { - cpu_ops: left.rows as f64 + ResourceEstimate::new( + left.rows as f64 * (heap_rows.max(2) as f64).log2().ceil() * ordering_key_count as f64, - peak_memory_bytes: checked_bytes(&[ - heap_rows, - per_row_width(left.rows, left.bytes)?, - ])?, - scan_bytes: 0, - } + checked_bytes(&[heap_rows, per_row_width(left.rows, left.bytes)?])?, + 0, + ) } ( PhysicalOperator::HashJoin { @@ -977,14 +1032,14 @@ pub fn estimate_operator( _, ) => { let right = input(1)?; - ResourceEstimate { - cpu_ops: checked_cpu_product( + ResourceEstimate::new( + checked_cpu_product( left.rows .checked_add(right.rows) .ok_or(AnalyticalCostError::Overflow)?, equality_key_count, )? + output.rows as f64, - peak_memory_bytes: match build_side { + match build_side { HashJoinBuildSide::Left => left .rows .checked_mul(16) @@ -995,14 +1050,14 @@ pub fn estimate_operator( .and_then(|metadata| right.bytes.checked_add(metadata)), } .ok_or(AnalyticalCostError::Overflow)?, - scan_bytes: 0, - } + 0, + ) } - (PhysicalOperator::Concat, _) => ResourceEstimate { - cpu_ops: output.rows as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, + (PhysicalOperator::Concat, _) => ResourceEstimate::new( + output.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ), (PhysicalOperator::Limit { limit, offset }, _) => { let consumed = if limit == 0 { 0 @@ -1013,11 +1068,11 @@ pub fn estimate_operator( .ok_or(AnalyticalCostError::Overflow)?, ) }; - ResourceEstimate { - cpu_ops: consumed as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - } + ResourceEstimate::new( + consumed as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ) } ( PhysicalOperator::PromqlRange { .. }, @@ -1027,24 +1082,20 @@ pub fn estimate_operator( }, ) => { let promql = require_promql_unary(edges)?; - ResourceEstimate { - cpu_ops: left.rows as f64, - peak_memory_bytes: checked_bytes(&[ + ResourceEstimate::new( + left.rows as f64, + checked_bytes(&[ promql.input.series, *max_window_samples_per_series, per_row_width(left.rows, left.bytes)?, ])?, - scan_bytes: 0, - } + 0, + ) } ( PhysicalOperator::PromqlSubquery { .. }, OperatorStatistics::PromqlSubquery { edges, .. }, - ) => ResourceEstimate { - cpu_ops: left.rows as f64 + output.rows as f64, - peak_memory_bytes: edges.input.bytes, - scan_bytes: 0, - }, + ) => ResourceEstimate::new(left.rows as f64 + output.rows as f64, edges.input.bytes, 0), ( PhysicalOperator::PromqlBinary { operand_mode, @@ -1077,22 +1128,22 @@ pub fn estimate_operator( ])? } }; - ResourceEstimate { - cpu_ops: left.rows as f64 + right.rows as f64 + output.rows as f64, - peak_memory_bytes: matching_bytes, - scan_bytes: 0, - } + ResourceEstimate::new( + left.rows as f64 + right.rows as f64 + output.rows as f64, + matching_bytes, + 0, + ) } ( PhysicalOperator::PromqlRelabel { expression_operations_per_row, }, OperatorStatistics::PromqlRelabel { .. }, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, expression_operations_per_row)?, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, + ) => ResourceEstimate::new( + checked_cpu_product(left.rows, expression_operations_per_row)?, + per_row_width(output.rows, output.bytes)?, + 0, + ), ( PhysicalOperator::PromqlInfoEnrich { matcher_operations_per_info_row, @@ -1104,19 +1155,19 @@ pub fn estimate_operator( ) => { let promql = require_promql_binary(edges)?; let right = input(1)?; - ResourceEstimate { - cpu_ops: left.rows as f64 + ResourceEstimate::new( + left.rows as f64 + right.rows as f64 + output.rows as f64 + checked_cpu_product(right.rows, matcher_operations_per_info_row)?, - peak_memory_bytes: checked_bytes(&[ + checked_bytes(&[ promql.inputs[1].series, matching_key_bytes .checked_add(16) .ok_or(AnalyticalCostError::Overflow)?, ])?, - scan_bytes: 0, - } + 0, + ) } ( PhysicalOperator::PromqlSeriesSample { .. }, @@ -1125,23 +1176,23 @@ pub fn estimate_operator( }, ) => { let promql = require_promql_unary(edges)?; - ResourceEstimate { - cpu_ops: left.rows as f64 + promql.input.series as f64, - peak_memory_bytes: checked_bytes(&[ + ResourceEstimate::new( + left.rows as f64 + promql.input.series as f64, + checked_bytes(&[ promql.output.series, key_bytes .checked_add(16) .ok_or(AnalyticalCostError::Overflow)?, ])?, - scan_bytes: 0, - } + 0, + ) } (PhysicalOperator::PromqlScalarToVector | PhysicalOperator::PromqlVectorToScalar, _) => { - ResourceEstimate { - cpu_ops: left.rows as f64 + output.rows as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - } + ResourceEstimate::new( + left.rows as f64 + output.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ) } ( PhysicalOperator::PromqlPerSeries { @@ -1153,25 +1204,22 @@ pub fn estimate_operator( }, ) => { let promql = require_promql_unary(edges)?; - ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, operations_per_row)?, - peak_memory_bytes: checked_bytes(&[ - promql.input.series, - *accumulator_bytes_per_series, - ])?, - scan_bytes: 0, - } + ResourceEstimate::new( + checked_cpu_product(left.rows, operations_per_row)?, + checked_bytes(&[promql.input.series, *accumulator_bytes_per_series])?, + 0, + ) } ( PhysicalOperator::PromqlPresence { operations_per_row, .. }, OperatorStatistics::PromqlPresence { .. }, - ) => ResourceEstimate { - cpu_ops: checked_cpu_product(left.rows, operations_per_row)? + output.rows as f64, - peak_memory_bytes: per_row_width(output.rows, output.bytes)?, - scan_bytes: 0, - }, + ) => ResourceEstimate::new( + checked_cpu_product(left.rows, operations_per_row)? + output.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ), (PhysicalOperator::PromqlScalarLeaf, _) => unreachable!(), _ => { return Err(AnalyticalCostError::InconsistentOperatorStatistics( @@ -1179,7 +1227,7 @@ pub fn estimate_operator( )); } }; - if estimate.cpu_ops.is_finite() { + if estimate.cpu_ops().is_finite() { Ok(estimate) } else { Err(AnalyticalCostError::Overflow) @@ -1927,9 +1975,9 @@ impl ResourceEstimate { calibration: &ResourceCalibration, ) -> Result { calibration.validate()?; - let value = self.cpu_ops * calibration.cost_per_cpu_op - + self.scan_bytes as f64 * calibration.cost_per_scan_byte - + self.peak_memory_bytes as f64 * calibration.cost_per_retained_byte; + let value = self.cpu_ops() * calibration.cost_per_cpu_op + + self.scan_bytes() as f64 * calibration.cost_per_scan_byte + + self.peak_memory_bytes() as f64 * calibration.cost_per_retained_byte; if value.is_finite() { Ok(value) } else { @@ -2016,6 +2064,42 @@ mod tests { PromqlUnaryEdgeStatistics, PromqlValueKind, SourceCoverage, UnaryEdgeStatistics, }; + /// Analytical estimates reuse the shared dimensions while preserving exact + /// integer bytes and keeping unmodeled storage quantities unavailable. + #[test] + fn analytical_estimate_uses_shared_resources() { + let estimate = ResourceEstimate::new(12.5, u64::MAX, 0); + assert_eq!(estimate.cpu_ops(), 12.5); + assert_eq!(estimate.peak_memory_bytes(), u64::MAX); + assert_eq!(estimate.scan_bytes(), 0); + let shared: &asap_types::resources::PhysicalResources = + estimate.resources(); + assert_eq!(shared.cpu.cpu_ops, 12.5); + assert_eq!(shared.peak_memory_bytes, Some(u64::MAX)); + assert_eq!(shared.scan_bytes, Some(0)); + assert_eq!(shared.retained_memory_bytes, None); + assert_eq!(shared.serialized_bytes, None); + assert_eq!(shared.disk_bytes, None); + } + + /// Existing JSON retains its three required fields; omitted or null + /// analytical quantities must not silently become a zero estimate. + #[test] + fn analytical_resource_wire_format_remains_compatible() { + let wire = serde_json::json!({"cpu_ops": 12.5, "peak_memory_bytes": 9007199254740993_u64, "scan_bytes": 0}); + let estimate: ResourceEstimate = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(estimate.peak_memory_bytes(), 9007199254740993); + assert_eq!(serde_json::to_value(estimate).unwrap(), wire); + for field in ["cpu_ops", "peak_memory_bytes", "scan_bytes"] { + let mut missing = wire.clone(); + missing.as_object_mut().unwrap().remove(field); + assert!(serde_json::from_value::(missing).is_err()); + let mut unknown = wire.clone(); + unknown[field] = serde_json::Value::Null; + assert!(serde_json::from_value::(unknown).is_err()); + } + } + fn filter_operator() -> PhysicalOperator { PhysicalOperator::Filter { predicate_operations_per_row: 1, @@ -2202,8 +2286,8 @@ mod tests { }; let estimate = estimate_operator(PhysicalOperator::PromqlScalarLeaf, statistics).unwrap(); - assert_eq!(estimate.cpu_ops, 10.0); - assert_eq!(estimate.peak_memory_bytes, 8); + assert_eq!(estimate.cpu_ops(), 10.0); + assert_eq!(estimate.peak_memory_bytes(), 8); } #[test] @@ -2410,7 +2494,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(scan.scan_bytes, 64_000); + assert_eq!(scan.scan_bytes(), 64_000); let topk = estimate_operator( PhysicalOperator::TopK { @@ -2433,9 +2517,9 @@ mod tests { }, ) .unwrap(); - assert_eq!(topk.scan_bytes, 0); - assert_eq!(topk.cpu_ops, 4_000.0); - assert_eq!(topk.peak_memory_bytes, 400); + assert_eq!(topk.scan_bytes(), 0); + assert_eq!(topk.cpu_ops(), 4_000.0); + assert_eq!(topk.peak_memory_bytes(), 400); let mismatched_join_statistics = estimate_operator( PhysicalOperator::HashJoin { @@ -2479,7 +2563,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(build_left.peak_memory_bytes, 80_000); + assert_eq!(build_left.peak_memory_bytes(), 80_000); let aggregate = estimate_operator( aggregate_operator(), @@ -2501,7 +2585,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(aggregate.peak_memory_bytes, 5_600); + assert_eq!(aggregate.peak_memory_bytes(), 5_600); let oversized_topk = estimate_operator( PhysicalOperator::TopK { @@ -2524,7 +2608,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(oversized_topk.cpu_ops, 8.0); + assert_eq!(oversized_topk.cpu_ops(), 8.0); let offset_limit = estimate_operator( PhysicalOperator::Limit { @@ -2546,7 +2630,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(offset_limit.cpu_ops, 900_010.0); + assert_eq!(offset_limit.cpu_ops(), 900_010.0); } #[test] @@ -2633,11 +2717,11 @@ mod tests { let mut scope = comparison_scope(); scope.horizon.0 = 20_000; let estimate = estimate_physical_dag(&nodes, "root", &scope, &provided).unwrap(); - assert_eq!(estimate.cpu_ops, 760.0); - assert_eq!(estimate.scan_bytes, 2_000); + assert_eq!(estimate.cpu_ops(), 760.0); + assert_eq!(estimate.scan_bytes(), 2_000); // This is neither the sum of every node's memory nor just the largest // node: it is the maximum state simultaneously live at the fan-out. - assert_eq!(estimate.peak_memory_bytes, 28); + assert_eq!(estimate.peak_memory_bytes(), 28); } #[test] @@ -2707,8 +2791,8 @@ mod tests { let mut scope = comparison_scope(); scope.horizon.0 = 100_000; let estimate = estimate_physical_dag(&nodes, "read", &scope, &provided).unwrap(); - assert_eq!(estimate.cpu_ops, 310.0); - assert_eq!(estimate.scan_bytes, 1_000); + assert_eq!(estimate.cpu_ops(), 310.0); + assert_eq!(estimate.scan_bytes(), 1_000); } fn comparison_scope() -> ComparisonScope { @@ -2928,8 +3012,8 @@ mod tests { let estimate = estimate_physical_dag(&nodes, "filter", &comparison_scope(), &provided).unwrap(); - assert_eq!(estimate.cpu_ops, 1_200.0); - assert_eq!(estimate.scan_bytes, 6_000); + assert_eq!(estimate.cpu_ops(), 1_200.0); + assert_eq!(estimate.scan_bytes(), 6_000); } #[test] @@ -2977,9 +3061,9 @@ mod tests { let estimate = estimate_physical_dag(&nodes, "filter", &comparison_scope(), &provided).unwrap(); - assert_eq!(estimate.cpu_ops, 1_200.0); - assert_eq!(estimate.peak_memory_bytes, 20); - assert_eq!(estimate.scan_bytes, 6_000); + assert_eq!(estimate.cpu_ops(), 1_200.0); + assert_eq!(estimate.peak_memory_bytes(), 20); + assert_eq!(estimate.scan_bytes(), 6_000); } #[test] @@ -3208,8 +3292,8 @@ mod tests { ) .unwrap(); - assert_eq!(estimate.scan_bytes, 2_500); - assert_eq!(estimate.peak_memory_bytes, 100); + assert_eq!(estimate.scan_bytes(), 2_500); + assert_eq!(estimate.peak_memory_bytes(), 100); } #[test] @@ -3225,7 +3309,7 @@ mod tests { assert_eq!( estimate_operator(filter_operator(), filter) .unwrap() - .scan_bytes, + .scan_bytes(), 0 ); } @@ -3266,8 +3350,8 @@ mod tests { }, ) .unwrap(); - assert_eq!(ungrouped.cpu_ops, 0.0); - assert_eq!(ungrouped.peak_memory_bytes, 24); + assert_eq!(ungrouped.cpu_ops(), 0.0); + assert_eq!(ungrouped.peak_memory_bytes(), 24); let grouped = estimate_operator( PhysicalOperator::HashAggregate { @@ -3282,7 +3366,7 @@ mod tests { }, ) .unwrap(); - assert_eq!(grouped.peak_memory_bytes, 0); + assert_eq!(grouped.peak_memory_bytes(), 0); } #[test] @@ -3302,7 +3386,7 @@ mod tests { filter, ) .unwrap() - .cpu_ops, + .cpu_ops(), 300.0 ); @@ -3328,8 +3412,8 @@ mod tests { }, ) .unwrap(); - assert_eq!(sort.cpu_ops, 600.0); - assert_eq!(sort.peak_memory_bytes, 400); + assert_eq!(sort.cpu_ops(), 600.0); + assert_eq!(sort.peak_memory_bytes(), 400); } #[test] diff --git a/crates/asap-aware-mapping/src/empirical_comparison.rs b/crates/asap-aware-mapping/src/empirical_comparison.rs index be6cb12b..ecd2a6cd 100644 --- a/crates/asap-aware-mapping/src/empirical_comparison.rs +++ b/crates/asap-aware-mapping/src/empirical_comparison.rs @@ -25,17 +25,7 @@ pub struct MeasurementQueryBinding { pub query: OfflineQueryDescriptor, } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct ExactResourceMeasurements { - pub empty_build_cpu_ns: Option, - pub update_cpu_ns: Option, - /// One prepare pass after ingesting the complete snapshot, before any read. - pub prepare_cpu_ns: Option, - pub read_cpu_ns: Option, - pub retained_bytes: Option, - pub peak_bytes: Option, -} +pub use crate::empirical_resources::ExactResourceMeasurements; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(deny_unknown_fields)] @@ -360,14 +350,18 @@ fn validate_exact(row: &OfflineExactMeasurement) -> Result<(), String> { { return Err("invalid exact baseline provenance".into()); } - let m = &row.metrics; + let m = &row.metrics.resources; for measurement in [ - &m.empty_build_cpu_ns, - &m.update_cpu_ns, - &m.prepare_cpu_ns, - &m.read_cpu_ns, - &m.retained_bytes, - &m.peak_bytes, + &m.cpu.build_cpu_ns, + &m.cpu.update_cpu_ns, + &m.cpu.merge_cpu_ns, + &m.cpu.prepare_cpu_ns, + &m.cpu.read_cpu_ns, + &m.retained_memory_bytes, + &m.peak_memory_bytes, + &m.serialized_bytes, + &m.disk_bytes, + &m.scan_bytes, ] .into_iter() .flatten() @@ -401,24 +395,26 @@ fn estimate_sketch( row: &OfflineMeasurement, request: &OfflineComparisonRequest, ) -> Result { - let m = &row.metrics; + let m = &row.metrics.resources; let w = &request.workload; - let cpu = charge(&m.build_cpu_ns, 1, "empty sketch construction CPU")? + let cpu = charge(&m.cpu.build_cpu_ns, 1, "empty sketch construction CPU")? + charge( - &m.update_cpu_ns, + &m.cpu.update_cpu_ns, w.input_items_per_state, "sketch update CPU", )? + charge( - &m.read_cpu_ns, + &m.cpu.read_cpu_ns, w.reads_per_state, "query-matched sketch read CPU", )? - + charge(&m.merge_cpu_ns, w.merges_per_state, "sketch merge CPU")?; + + charge(&m.cpu.merge_cpu_ns, w.merges_per_state, "sketch merge CPU")? + + crate::empirical_cost::snapshot_prepare_cpu(row) + .ok_or("missing or invalid sketch snapshot preparation CPU")?; estimate_resources( cpu, - &m.retained_bytes, - &m.peak_bytes, + &m.retained_memory_bytes, + &m.peak_memory_bytes, m.serialized_bytes.as_ref().map(|m| m.value), m.disk_bytes.as_ref().map(|m| m.value), request, @@ -429,17 +425,24 @@ fn estimate_exact( row: &OfflineExactMeasurement, request: &OfflineComparisonRequest, ) -> Result { - let m = &row.metrics; + let m = &row.metrics.resources; let w = &request.workload; - let cpu = charge(&m.empty_build_cpu_ns, 1, "exact empty construction CPU")? + let cpu = charge(&m.cpu.build_cpu_ns, 1, "exact empty construction CPU")? + charge( - &m.update_cpu_ns, + &m.cpu.update_cpu_ns, w.input_items_per_state, "exact update CPU", )? - + charge(&m.prepare_cpu_ns, 1, "exact snapshot preparation CPU")? - + charge(&m.read_cpu_ns, w.reads_per_state, "exact read CPU")?; - estimate_resources(cpu, &m.retained_bytes, &m.peak_bytes, None, None, request) + + charge(&m.cpu.prepare_cpu_ns, 1, "exact snapshot preparation CPU")? + + charge(&m.cpu.read_cpu_ns, w.reads_per_state, "exact read CPU")?; + estimate_resources( + cpu, + &m.retained_memory_bytes, + &m.peak_memory_bytes, + m.serialized_bytes.as_ref().map(|m| m.value), + m.disk_bytes.as_ref().map(|m| m.value), + request, + ) } fn estimate_resources( @@ -558,10 +561,10 @@ mod tests { probe_set: "all_distinct_keys".into(), }; let row = &mut sketches.records[0]; - row.metrics.build_cpu_ns = m(1.0); - row.metrics.update_cpu_ns = m(1.0); - row.metrics.read_cpu_ns = m(1.0); - row.metrics.retained_bytes = m(100.0); + row.metrics.resources.cpu.build_cpu_ns = m(1.0); + row.metrics.resources.cpu.update_cpu_ns = m(1.0); + row.metrics.resources.cpu.read_cpu_ns = m(1.0); + row.metrics.resources.retained_memory_bytes = m(100.0); row.error.as_mut().unwrap().mean = Some(0.5); row.error.as_mut().unwrap().query = serde_json::json!({"kind":"point_frequency","value_type":"i64"}); @@ -571,8 +574,8 @@ mod tests { width: 544, depth: 5, }; - wide.metrics.update_cpu_ns = m(2.0); - wide.metrics.retained_bytes = m(200.0); + wide.metrics.resources.cpu.update_cpu_ns = m(2.0); + wide.metrics.resources.retained_memory_bytes = m(200.0); wide.error.as_mut().unwrap().mean = Some(0.001); let context = EvidenceContext { distribution: row.distribution.clone(), @@ -591,12 +594,17 @@ mod tests { valid_until_unix_seconds: 200, provenance: row.provenance.clone(), metrics: ExactResourceMeasurements { - empty_build_cpu_ns: m(1.0), - update_cpu_ns: m(5.0), - prepare_cpu_ns: m(1000.0), - read_cpu_ns: m(5.0), - retained_bytes: m(1000.0), - peak_bytes: None, + resources: asap_types::resources::MeasuredResources { + cpu: asap_types::resources::MeasuredCpu { + build_cpu_ns: m(1.0), + update_cpu_ns: m(5.0), + prepare_cpu_ns: m(1000.0), + read_cpu_ns: m(5.0), + ..Default::default() + }, + retained_memory_bytes: m(1000.0), + ..Default::default() + }, }, }; let metric = row.error.as_ref().unwrap().metric.clone(); @@ -676,6 +684,74 @@ mod tests { ); } + /// Optional sketch preparation is charged once; exact preparation never + /// borrows the independent merge measurement, and snapshot bytes survive. + #[test] + fn preparation_and_exact_resource_dimensions_keep_their_meaning() { + let (mut evidence, request) = fixture(); + let old = recommend_offline(&evidence, &request).unwrap(); + evidence.sketch_evidence.records[1] + .metrics + .resources + .cpu + .prepare_cpu_ns = m(37.0); + let exact = &mut evidence.exact_records[0].metrics.resources; + exact.cpu.merge_cpu_ns = m(1e9); + exact.serialized_bytes = m(256.0); + exact.disk_bytes = m(4096.0); + exact.scan_bytes = m(8000.0); + let changed = recommend_offline(&evidence, &request).unwrap(); + assert_eq!( + changed.selected.resources.as_ref().unwrap().cpu_ns, + old.selected.resources.as_ref().unwrap().cpu_ns + 37.0 + ); + let baseline = changed.exact_baseline.resources.unwrap(); + assert_eq!( + baseline.cpu_ns, + old.exact_baseline.resources.unwrap().cpu_ns + ); + assert_eq!(baseline.serialized_bytes_per_state, Some(256.0)); + assert_eq!(baseline.disk_bytes_per_state, Some(4096.0)); + } + + /// Exact observations validate optional dimensions even when the comparison + /// does not execute the corresponding operation. + #[test] + fn optional_exact_dimensions_cannot_hide_invalid_measurements() { + let selectors: [fn( + &mut asap_types::resources::MeasuredResources, + ) -> &mut Option; 4] = [ + |r| &mut r.cpu.merge_cpu_ns, + |r| &mut r.serialized_bytes, + |r| &mut r.disk_bytes, + |r| &mut r.scan_bytes, + ]; + for select in selectors { + let (mut evidence, request) = fixture(); + *select(&mut evidence.exact_records[0].metrics.resources) = m(-1.0); + assert!(recommend_offline(&evidence, &request).is_err()); + } + } + + /// A family outside the established CMS/CountSketch contract cannot gain + /// an apparently cheap comparison by omitting its preparation measurement. + #[test] + fn sketch_comparison_requires_unknown_preparation_phase() { + let (evidence, request) = fixture(); + let mut row = evidence.sketch_evidence.records[1].clone(); + let original_cpu = estimate_sketch(&row, &request).unwrap().cpu_ns; + row.algorithm = SketchAlgorithm::Kll; + row.params = SketchParams::Kll { k: 269 }; + assert!(estimate_sketch(&row, &request) + .unwrap_err() + .contains("preparation CPU")); + row.metrics.resources.cpu.prepare_cpu_ns = m(37.0); + assert_eq!( + estimate_sketch(&row, &request).unwrap().cpu_ns, + original_cpu + 37.0 + ); + } + /// Missing required measurements and failing observed-error budgets return /// the applicable exact baseline, never an optimistically free sketch. #[test] @@ -687,7 +763,11 @@ mod tests { .selected_sketch() .is_none()); request.accuracy.max_observed_mean = 0.01; - evidence.sketch_evidence.records[1].metrics.build_cpu_ns = None; + evidence.sketch_evidence.records[1] + .metrics + .resources + .cpu + .build_cpu_ns = None; let chosen = recommend_offline(&evidence, &request).unwrap(); assert!(chosen.selected_sketch().is_none()); assert!(chosen.candidates[1] @@ -695,7 +775,11 @@ mod tests { .as_ref() .unwrap() .contains("construction")); - evidence.exact_records[0].metrics.prepare_cpu_ns = None; + evidence.exact_records[0] + .metrics + .resources + .cpu + .prepare_cpu_ns = None; assert!(recommend_offline(&evidence, &request) .unwrap_err() .contains("preparation")); @@ -748,7 +832,10 @@ mod tests { #[test] fn resource_objective_and_unknown_memory_are_explicit() { let (mut evidence, mut request) = fixture(); - evidence.sketch_evidence.records[1].metrics.retained_bytes = None; + evidence.sketch_evidence.records[1] + .metrics + .resources + .retained_memory_bytes = None; let chosen = recommend_offline(&evidence, &request).unwrap(); assert!(chosen.selected.resources.unwrap().retained_bytes.is_none()); request.weights.retained_byte_seconds_weight = 1.0; @@ -756,7 +843,10 @@ mod tests { .unwrap() .selected_sketch() .is_none()); - evidence.sketch_evidence.records[1].metrics.retained_bytes = m(10000.0); + evidence.sketch_evidence.records[1] + .metrics + .resources + .retained_memory_bytes = m(10000.0); assert!(recommend_offline(&evidence, &request) .unwrap() .selected_sketch() diff --git a/crates/asap-aware-mapping/src/empirical_cost.rs b/crates/asap-aware-mapping/src/empirical_cost.rs index 58aa158d..2e195bd3 100644 --- a/crates/asap-aware-mapping/src/empirical_cost.rs +++ b/crates/asap-aware-mapping/src/empirical_cost.rs @@ -17,31 +17,8 @@ use crate::summary_maintenance_lifecycle::SummaryMaintenanceLifecycleCostInputs; pub const EVIDENCE_SCHEMA_VERSION: u32 = 1; pub const EVIDENCE_MODEL_VERSION: &str = "empirical-update-cpu-v1"; -/// Field names carry units; `None` means unmeasured, including disk and heap. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct Measurement { - pub value: f64, - pub stddev: Option, - pub samples: u32, - /// Measurement procedure and scope, e.g. counter payload vs allocator heap. - #[serde(default)] - pub method: Option, -} - -#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct ResourceMeasurements { - /// Empty sketch construction; ingesting the snapshot is charged separately. - pub build_cpu_ns: Option, - pub update_cpu_ns: Option, - pub merge_cpu_ns: Option, - pub read_cpu_ns: Option, - pub retained_bytes: Option, - pub peak_bytes: Option, - pub serialized_bytes: Option, - pub disk_bytes: Option, -} +pub use crate::empirical_resources::ResourceMeasurements; +pub use asap_types::resources::Measurement; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] @@ -218,6 +195,8 @@ impl EmpiricalEvidenceProvider { self.lookup(algorithm, ¶ms) .ok()? .metrics + .resources + .cpu .update_cpu_ns .as_ref() .map(|m| (algorithm.clone(), m.value)) @@ -250,7 +229,13 @@ impl EmpiricalEvidenceProvider { }; SummaryMaintenanceLifecycleCostInputs { build_cost: snapshot_build_cpu(row).map(Cost), - maintenance_cost_per_update: row.metrics.update_cpu_ns.as_ref().map(|m| Cost(m.value)), + maintenance_cost_per_update: row + .metrics + .resources + .cpu + .update_cpu_ns + .as_ref() + .map(|m| Cost(m.value)), // A point-frequency benchmark read does not price a total-count // or quantile read. There is no query request in this hook. summary_read_cost: None, @@ -329,16 +314,18 @@ impl EvidenceArtifact { if !valid_params(&row.algorithm, &row.params) { return invalid("invalid or mismatched sketch parameters"); } - let m = &row.metrics; + let m = &row.metrics.resources; for measurement in [ - &m.build_cpu_ns, - &m.update_cpu_ns, - &m.merge_cpu_ns, - &m.read_cpu_ns, - &m.retained_bytes, - &m.peak_bytes, + &m.cpu.build_cpu_ns, + &m.cpu.update_cpu_ns, + &m.cpu.merge_cpu_ns, + &m.cpu.prepare_cpu_ns, + &m.cpu.read_cpu_ns, + &m.retained_memory_bytes, + &m.peak_memory_bytes, &m.serialized_bytes, &m.disk_bytes, + &m.scan_bytes, ] .into_iter() .flatten() @@ -375,11 +362,30 @@ fn nonnegative(value: f64) -> bool { } fn snapshot_build_cpu(row: &OfflineMeasurement) -> Option { - let cpu = row.metrics.build_cpu_ns.as_ref()?.value - + row.metrics.update_cpu_ns.as_ref()?.value * row.distribution.sample_count as f64; + let cpu = row.metrics.resources.cpu.build_cpu_ns.as_ref()?.value + + row.metrics.resources.cpu.update_cpu_ns.as_ref()?.value + * row.distribution.sample_count as f64 + + snapshot_prepare_cpu(row)?; nonnegative(cpu).then_some(cpu) } +/// The existing fixed-snapshot CMS/CountSketch contract needs no separate +/// preparation. Other families must measure that phase, including an explicit +/// zero when no preparation is necessary; absence is not free work. +pub(crate) fn snapshot_prepare_cpu(row: &OfflineMeasurement) -> Option { + match &row.metrics.resources.cpu.prepare_cpu_ns { + Some(measurement) => nonnegative(measurement.value).then_some(measurement.value), + None if matches!( + row.algorithm, + SketchAlgorithm::Cms | SketchAlgorithm::CountSketch + ) => + { + Some(0.0) + } + None => None, + } +} + fn validate_context( distribution: &DistributionDescriptor, environment: &EnvironmentDescriptor, @@ -482,15 +488,69 @@ mod tests { fn lifecycle_build_requires_complete_snapshot_ingestion() { let (mut artifact, _, _) = fixture(); let row = &mut artifact.records[0]; - row.metrics.build_cpu_ns = Some(Measurement { + row.metrics.resources.cpu.build_cpu_ns = Some(Measurement { + value: 10.0, + stddev: None, + samples: 1, + method: None, + }); + assert_eq!(snapshot_build_cpu(row), Some(20010.0)); + row.metrics.resources.cpu.prepare_cpu_ns = Some(Measurement { + value: 17.0, + stddev: None, + samples: 1, + method: None, + }); + assert_eq!(snapshot_build_cpu(row), Some(20027.0)); + row.metrics.resources.cpu.update_cpu_ns = None; + assert_eq!(snapshot_build_cpu(row), None); + } + + /// Newly shared optional dimensions receive the same numeric validation. + #[test] + fn optional_prepare_and_scan_measurements_are_validated() { + for prepare in [true, false] { + let (mut artifact, _, _) = fixture(); + let resources = &mut artifact.records[0].metrics.resources; + let field = if prepare { + &mut resources.cpu.prepare_cpu_ns + } else { + &mut resources.scan_bytes + }; + *field = Some(Measurement { + value: -1.0, + stddev: None, + samples: 1, + method: None, + }); + assert!(artifact.validate().is_err()); + } + } + + /// Only the established frequency-sketch contract can omit preparation. + #[test] + fn unmeasured_preparation_for_other_families_keeps_build_unknown() { + let (mut artifact, _, _) = fixture(); + let row = &mut artifact.records[0]; + row.metrics.resources.cpu.build_cpu_ns = Some(Measurement { value: 10.0, stddev: None, samples: 1, method: None, }); assert_eq!(snapshot_build_cpu(row), Some(20010.0)); - row.metrics.update_cpu_ns = None; + row.algorithm = SketchAlgorithm::CountSketch; + assert_eq!(snapshot_prepare_cpu(row), Some(0.0)); + row.algorithm = SketchAlgorithm::Kll; + row.params = SketchParams::Kll { k: 269 }; assert_eq!(snapshot_build_cpu(row), None); + row.metrics.resources.cpu.prepare_cpu_ns = Some(Measurement { + value: 17.0, + stddev: None, + samples: 1, + method: None, + }); + assert_eq!(snapshot_build_cpu(row), Some(20027.0)); } fn fixture() -> (EvidenceArtifact, EvidenceContext, AggIntent) { @@ -535,13 +595,18 @@ mod tests { repetitions: 3, }, metrics: ResourceMeasurements { - update_cpu_ns: Some(Measurement { - value: cost, - stddev: Some(1.0), - samples: 3, - method: None, - }), - ..Default::default() + resources: asap_types::resources::MeasuredResources { + cpu: asap_types::resources::MeasuredCpu { + update_cpu_ns: Some(Measurement { + value: cost, + stddev: Some(1.0), + samples: 3, + method: None, + }), + ..Default::default() + }, + ..Default::default() + }, }, error: Some(OfflineError { metric: "mean absolute relative frequency error".into(), @@ -651,7 +716,7 @@ mod tests { #[test] fn serialization_preserves_unknown_zero_and_provenance() { let (mut artifact, context, _) = fixture(); - artifact.records[0].metrics.disk_bytes = Some(Measurement { + artifact.records[0].metrics.resources.disk_bytes = Some(Measurement { value: 0.0, stddev: None, samples: 1, @@ -663,8 +728,11 @@ mod tests { let row = provider .lookup(&artifact.records[0].algorithm, &artifact.records[0].params) .unwrap(); - assert!(row.metrics.peak_bytes.is_none()); - assert_eq!(row.metrics.disk_bytes.as_ref().unwrap().value, 0.0); + assert!(row.metrics.resources.peak_memory_bytes.is_none()); + assert_eq!( + row.metrics.resources.disk_bytes.as_ref().unwrap().value, + 0.0 + ); assert_eq!(row.provenance, artifact.records[0].provenance); assert_eq!(row.error.as_ref().unwrap().query["kind"], "point_frequency"); } @@ -678,7 +746,14 @@ mod tests { bad.schema_version = 2; assert_eq!(bad.validate(), Err(EvidenceError::UnsupportedVersion(2))); let mut bad = artifact.clone(); - bad.records[0].metrics.update_cpu_ns.as_mut().unwrap().value = f64::NAN; + bad.records[0] + .metrics + .resources + .cpu + .update_cpu_ns + .as_mut() + .unwrap() + .value = f64::NAN; assert!(bad.validate().is_err()); let mut bad = artifact.clone(); bad.records[0].params = SketchParams::Hll { precision: 14 }; diff --git a/crates/asap-aware-mapping/src/empirical_resources.rs b/crates/asap-aware-mapping/src/empirical_resources.rs new file mode 100644 index 00000000..716392f3 --- /dev/null +++ b/crates/asap-aware-mapping/src/empirical_resources.rs @@ -0,0 +1,202 @@ +//! Measured resource payloads and compatibility with the v1 benchmark wire format. +//! +//! Physical dimensions live in `asap_types::resources`; flat wire structs below +//! exist only to keep archived artifacts readable and preserve their field names. + +use asap_types::resources::PhysicalResources; +use serde::{Deserialize, Serialize}; + +pub use asap_types::resources::{MeasuredCpu, MeasuredResources, Measurement}; + +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[serde(from = "SketchWire", into = "SketchWire")] +pub struct ResourceMeasurements { + pub resources: MeasuredResources, +} + +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[serde(from = "ExactWire", into = "ExactWire")] +pub struct ExactResourceMeasurements { + pub resources: MeasuredResources, +} + +// Keep the archived flat v1 schema at the serialization boundary only. New +// optional dimensions are omitted when absent, so legacy snapshots round-trip. +#[derive(Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct SketchWire { + build_cpu_ns: Option, + update_cpu_ns: Option, + merge_cpu_ns: Option, + read_cpu_ns: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + prepare_cpu_ns: Option, + retained_bytes: Option, + peak_bytes: Option, + serialized_bytes: Option, + disk_bytes: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + scan_bytes: Option, +} + +#[derive(Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +struct ExactWire { + empty_build_cpu_ns: Option, + update_cpu_ns: Option, + prepare_cpu_ns: Option, + read_cpu_ns: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + merge_cpu_ns: Option, + retained_bytes: Option, + peak_bytes: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + serialized_bytes: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + disk_bytes: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + scan_bytes: Option, +} + +impl From for ResourceMeasurements { + fn from(w: SketchWire) -> Self { + Self { + resources: PhysicalResources { + cpu: MeasuredCpu { + build_cpu_ns: w.build_cpu_ns, + update_cpu_ns: w.update_cpu_ns, + merge_cpu_ns: w.merge_cpu_ns, + prepare_cpu_ns: w.prepare_cpu_ns, + read_cpu_ns: w.read_cpu_ns, + }, + retained_memory_bytes: w.retained_bytes, + peak_memory_bytes: w.peak_bytes, + serialized_bytes: w.serialized_bytes, + disk_bytes: w.disk_bytes, + scan_bytes: w.scan_bytes, + }, + } + } +} + +impl From for SketchWire { + fn from(value: ResourceMeasurements) -> Self { + let r = value.resources; + Self { + build_cpu_ns: r.cpu.build_cpu_ns, + update_cpu_ns: r.cpu.update_cpu_ns, + merge_cpu_ns: r.cpu.merge_cpu_ns, + prepare_cpu_ns: r.cpu.prepare_cpu_ns, + read_cpu_ns: r.cpu.read_cpu_ns, + retained_bytes: r.retained_memory_bytes, + peak_bytes: r.peak_memory_bytes, + serialized_bytes: r.serialized_bytes, + disk_bytes: r.disk_bytes, + scan_bytes: r.scan_bytes, + } + } +} + +impl From for ExactResourceMeasurements { + fn from(w: ExactWire) -> Self { + Self { + resources: PhysicalResources { + cpu: MeasuredCpu { + build_cpu_ns: w.empty_build_cpu_ns, + update_cpu_ns: w.update_cpu_ns, + merge_cpu_ns: w.merge_cpu_ns, + prepare_cpu_ns: w.prepare_cpu_ns, + read_cpu_ns: w.read_cpu_ns, + }, + retained_memory_bytes: w.retained_bytes, + peak_memory_bytes: w.peak_bytes, + serialized_bytes: w.serialized_bytes, + disk_bytes: w.disk_bytes, + scan_bytes: w.scan_bytes, + }, + } + } +} + +impl From for ExactWire { + fn from(value: ExactResourceMeasurements) -> Self { + let r = value.resources; + Self { + empty_build_cpu_ns: r.cpu.build_cpu_ns, + update_cpu_ns: r.cpu.update_cpu_ns, + merge_cpu_ns: r.cpu.merge_cpu_ns, + prepare_cpu_ns: r.cpu.prepare_cpu_ns, + read_cpu_ns: r.cpu.read_cpu_ns, + retained_bytes: r.retained_memory_bytes, + peak_bytes: r.peak_memory_bytes, + serialized_bytes: r.serialized_bytes, + disk_bytes: r.disk_bytes, + scan_bytes: r.scan_bytes, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn measured(value: f64) -> Option { + Some(Measurement { + value, + stddev: Some(0.5), + samples: 5, + method: Some("test only".into()), + }) + } + + /// The same resource dimensions retain uncertainty through either wire adapter. + #[test] + fn shared_resources_round_trip_without_losing_dimensions() { + let resources = PhysicalResources { + cpu: MeasuredCpu { + build_cpu_ns: measured(1.0), + update_cpu_ns: measured(2.0), + merge_cpu_ns: measured(3.0), + prepare_cpu_ns: measured(4.0), + read_cpu_ns: measured(5.0), + }, + peak_memory_bytes: measured(100.0), + retained_memory_bytes: measured(70.0), + scan_bytes: measured(200.0), + serialized_bytes: measured(40.0), + disk_bytes: measured(4096.0), + }; + let sketch = ResourceMeasurements { + resources: resources.clone(), + }; + let exact = ExactResourceMeasurements { resources }; + assert_eq!( + serde_json::from_value::(serde_json::to_value(&sketch).unwrap()) + .unwrap(), + sketch + ); + assert_eq!( + serde_json::from_value::( + serde_json::to_value(&exact).unwrap() + ) + .unwrap(), + exact + ); + } + + /// Archived names remain accepted, but physical fields use canonical names. + #[test] + fn legacy_fields_map_to_shared_resources() { + let value = serde_json::json!({"empty_build_cpu_ns": measured(3.0), "peak_bytes": measured(100.0), "retained_bytes": measured(70.0)}); + let exact: ExactResourceMeasurements = serde_json::from_value(value).unwrap(); + assert_eq!(exact.resources.cpu.build_cpu_ns, measured(3.0)); + assert_eq!(exact.resources.peak_memory_bytes, measured(100.0)); + assert_eq!(exact.resources.retained_memory_bytes, measured(70.0)); + assert!(exact.resources.scan_bytes.is_none()); + assert!(exact.resources.disk_bytes.is_none()); + assert!( + serde_json::from_value::(serde_json::json!({"cpu_ops": 42})) + .is_err() + ); + } +} diff --git a/crates/asap-aware-mapping/src/lib.rs b/crates/asap-aware-mapping/src/lib.rs index d7c2586d..27021625 100644 --- a/crates/asap-aware-mapping/src/lib.rs +++ b/crates/asap-aware-mapping/src/lib.rs @@ -187,6 +187,7 @@ pub mod analytical_cost; pub mod cost_model; pub mod empirical_comparison; pub mod empirical_cost; +pub mod empirical_resources; pub mod explanation; pub mod grouping; pub mod physical_operator_statistics; diff --git a/crates/asap-aware-mapping/src/query_physical_lowering.rs b/crates/asap-aware-mapping/src/query_physical_lowering.rs index b52f96a7..79a31789 100644 --- a/crates/asap-aware-mapping/src/query_physical_lowering.rs +++ b/crates/asap-aware-mapping/src/query_physical_lowering.rs @@ -1632,7 +1632,7 @@ mod tests { let estimate = estimate_physical_dag(&dag.nodes, &dag.root, &independent_scope, &dag.evidence) .unwrap(); - assert_eq!(estimate.scan_bytes, 1_600); + assert_eq!(estimate.scan_bytes(), 1_600); let shared_provider = |request: PhysicalNodeRequest<'_>| { let (physical_id, statistics) = match request.operator { @@ -1668,8 +1668,8 @@ mod tests { }, ) .unwrap(); - assert_eq!(comparison.raw.scan_bytes, 1_600); - assert_eq!(comparison.candidate.scan_bytes, 800); + assert_eq!(comparison.raw.scan_bytes(), 1_600); + assert_eq!(comparison.candidate.scan_bytes(), 800); let mut drifted_buffer = shared_dag.clone(); drifted_buffer.nodes[0].output_buffer_bytes += 1; @@ -2167,8 +2167,8 @@ mod tests { ]); let dag = lower_query_physical_dag(&root, &scope, &scripted(&provided)).unwrap(); let estimate = estimate_physical_dag(&dag.nodes, &dag.root, &scope, &dag.evidence).unwrap(); - assert_eq!(estimate.cpu_ops, 200.0); - assert_eq!(estimate.scan_bytes, 800); + assert_eq!(estimate.cpu_ops(), 200.0); + assert_eq!(estimate.scan_bytes(), 800); } #[test] diff --git a/crates/asap-aware-mapping/src/summary_maintenance_cost/estimator.rs b/crates/asap-aware-mapping/src/summary_maintenance_cost/estimator.rs index 53c93052..d7c28ae1 100644 --- a/crates/asap-aware-mapping/src/summary_maintenance_cost/estimator.rs +++ b/crates/asap-aware-mapping/src/summary_maintenance_cost/estimator.rs @@ -545,18 +545,18 @@ pub(super) fn estimate_heterogeneous_summary( if !cpu_ops.is_finite() { return Err(AnalyticalCostError::Overflow); } - Ok(ResourceEstimate { + Ok(ResourceEstimate::new( cpu_ops, - peak_memory_bytes: persistent_bytes + persistent_bytes .checked_add(transient_bytes) .and_then(|bytes| bytes.checked_add(ephemeral_state_bytes)) .ok_or(AnalyticalCostError::Overflow)?, - scan_bytes: scans + scans .values() .try_fold(operator_io_bytes, |sum, (_, bytes)| { sum.checked_add(*bytes).ok_or(AnalyticalCostError::Overflow) })?, - }) + )) } fn add_operator_io( @@ -1070,15 +1070,15 @@ pub(super) fn estimate_incremental_summary_maintenance_with_join( .initial_input_bytes .div_ceil(inputs.initial_input_rows) }; - Ok(ResourceEstimate { + Ok(ResourceEstimate::new( cpu_ops, - peak_memory_bytes: retained_bytes + retained_bytes .checked_add(transient_bytes) .and_then(|bytes| bytes.checked_add(join_bytes)) .ok_or(AnalyticalCostError::Overflow)? .max(bootstrap_row_buffer), - scan_bytes: inputs.initial_source_scan_bytes, - }) + inputs.initial_source_scan_bytes, + )) } pub(super) fn lifecycle_row_counts( diff --git a/crates/asap-aware-mapping/src/summary_maintenance_cost/model.rs b/crates/asap-aware-mapping/src/summary_maintenance_cost/model.rs index 1eb0fac7..e7371650 100644 --- a/crates/asap-aware-mapping/src/summary_maintenance_cost/model.rs +++ b/crates/asap-aware-mapping/src/summary_maintenance_cost/model.rs @@ -637,28 +637,22 @@ impl SummaryMaintenanceCostModel { let evidence = self.canonical_inputs(summary)?; let inputs = evidence.inputs; let insert = validated_operator_cpu("insert_cpu_ops", evidence.insert_cpu_ops).ok()?; - let build = self.calibrated(ResourceEstimate { - cpu_ops: inputs.initial_input_rows as f64 - * inputs.bootstrap_window_count as f64 - * insert, - peak_memory_bytes: 0, - scan_bytes: inputs.initial_source_scan_bytes, - })?; - let maintenance = self.calibrated(ResourceEstimate { - cpu_ops: inputs.active_window_count as f64 * insert, - peak_memory_bytes: 0, - scan_bytes: 0, - })?; + let build = self.calibrated(ResourceEstimate::new( + inputs.initial_input_rows as f64 * inputs.bootstrap_window_count as f64 * insert, + 0, + inputs.initial_source_scan_bytes, + ))?; + let maintenance = self.calibrated(ResourceEstimate::new( + inputs.active_window_count as f64 * insert, + 0, + 0, + ))?; let retained = inputs .active_window_count .checked_add(inputs.retained_window_count)? .checked_mul(inputs.physical_summary_count)? .checked_mul(inputs.state_bytes_per_summary)?; - let retention_total = self.calibrated(ResourceEstimate { - cpu_ops: 0.0, - peak_memory_bytes: retained, - scan_bytes: 0, - })?; + let retention_total = self.calibrated(ResourceEstimate::new(0.0, retained, 0))?; let horizon_seconds = horizon.filter(|value| value.0 > 0.0)?.0; Some(SummaryMaintenanceLifecycleCostInputs { build_cost: Some(build), @@ -1059,8 +1053,8 @@ mod tests { ) .unwrap(); // 10 arrivals * 2 active windows * 2 insert ops + 5 reads * 2 summaries. - assert_eq!(estimate.cpu_ops, 50.0); - assert_eq!(estimate.scan_bytes, 0); + assert_eq!(estimate.cpu_ops(), 50.0); + assert_eq!(estimate.scan_bytes(), 0); } #[test] @@ -1112,7 +1106,7 @@ mod tests { ) .unwrap(); // 10 bootstrap rows * 3 windows * 2 insert ops + 5 reads * 2 summaries. - assert_eq!(estimate.cpu_ops, 70.0); + assert_eq!(estimate.cpu_ops(), 70.0); } #[test] @@ -2604,9 +2598,9 @@ mod tests { ) .unwrap(); // 10 bootstrap + 10 arrivals into two active windows; two states read 5 times. - assert_eq!(estimate.cpu_ops, 90.0); - assert_eq!(estimate.peak_memory_bytes, 1_000); - assert_eq!(estimate.scan_bytes, 640); + assert_eq!(estimate.cpu_ops(), 90.0); + assert_eq!(estimate.peak_memory_bytes(), 1_000); + assert_eq!(estimate.scan_bytes(), 640); } #[test] @@ -2636,9 +2630,9 @@ mod tests { }, ) .unwrap(); - assert_eq!(estimate.cpu_ops, 21.0 + 20.0 + 30.0 + 200.0 + 70.0); + assert_eq!(estimate.cpu_ops(), 21.0 + 20.0 + 30.0 + 200.0 + 70.0); // Three persistent windows plus one transient result, for two instances. - assert_eq!(estimate.peak_memory_bytes, 80); + assert_eq!(estimate.peak_memory_bytes(), 80); } #[test] @@ -2762,7 +2756,7 @@ mod tests { .unwrap(); // Two pre-activation arrivals join the bootstrap; eight more are // maintained through the horizon; five reads are served. - assert_eq!(estimate.cpu_ops, 25.0); + assert_eq!(estimate.cpu_ops(), 25.0); } #[test] @@ -2859,8 +2853,8 @@ mod tests { }), ) .unwrap(); - assert_eq!(estimate.cpu_ops, 77.0); - assert_eq!(estimate.peak_memory_bytes, 64); // 4 persistent states + join memory. + assert_eq!(estimate.cpu_ops(), 77.0); + assert_eq!(estimate.peak_memory_bytes(), 64); // 4 persistent states + join memory. } fn summary_with_operations(merge: bool, subtract: bool, delete: bool) -> Rc { diff --git a/crates/devtools/src/bin/dag_export.rs b/crates/devtools/src/bin/dag_export.rs index a0c7e146..4f900556 100644 --- a/crates/devtools/src/bin/dag_export.rs +++ b/crates/devtools/src/bin/dag_export.rs @@ -413,17 +413,17 @@ impl ExportPlannerCostModel<'_> { vec![ CostInput { name: "estimated_cpu_ops".into(), - value: resources.cpu_ops, + value: resources.cpu_ops(), unit: Some("operations".into()), }, CostInput { name: "estimated_peak_memory".into(), - value: resources.peak_memory_bytes as f64, + value: resources.peak_memory_bytes() as f64, unit: Some("bytes".into()), }, CostInput { name: "estimated_scan".into(), - value: resources.scan_bytes as f64, + value: resources.scan_bytes() as f64, unit: Some("bytes".into()), }, ] diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index dbc1665c..8b65cb1c 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -23,5 +23,6 @@ pub mod cost; pub mod dag_export; pub mod post_asap; pub mod pre_asap; +pub mod resources; pub mod types; pub mod workload; diff --git a/crates/types/src/resources.rs b/crates/types/src/resources.rs new file mode 100644 index 00000000..b4937043 --- /dev/null +++ b/crates/types/src/resources.rs @@ -0,0 +1,131 @@ +//! Resource dimensions shared by analytical estimates and benchmark evidence. +//! +//! The CPU payload establishes its unit and operation scope; CPU operations +//! must never be interpreted as nanoseconds. Byte values can be exact integers +//! or measurements carrying uncertainty. `None` means unavailable, not zero. + +use serde::{Deserialize, Serialize}; + +/// Modeled CPU work, never measured elapsed or process CPU time. +#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct ModeledCpu { + pub cpu_ops: f64, +} + +/// A measured quantity whose unit and operation scope are set by its field. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct Measurement { + pub value: f64, + pub stddev: Option, + pub samples: u32, + /// Measurement procedure and scope, such as allocator heap versus payload. + #[serde(default)] + pub method: Option, +} + +/// Process CPU nanoseconds per named operation, never modeled CPU operations. +/// An absent phase was not measured; it does not imply a free operation. +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct MeasuredCpu { + /// Empty construction; ingestion is charged separately. + pub build_cpu_ns: Option, + pub update_cpu_ns: Option, + pub merge_cpu_ns: Option, + /// One prepare pass after ingestion and before reads. + pub prepare_cpu_ns: Option, + pub read_cpu_ns: Option, +} + +pub type MeasuredResources = PhysicalResources; + +#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] +#[serde(deny_unknown_fields)] +pub struct PhysicalResources { + pub cpu: Cpu, + /// Maximum simultaneously live memory within the reported scope. + pub peak_memory_bytes: Option, + /// Memory still retained at the end of the reported scope. + pub retained_memory_bytes: Option, + /// Bytes read by scan operations, not storage occupancy. + pub scan_bytes: Option, + /// Logical encoded snapshot size, not in-memory state size. + pub serialized_bytes: Option, + /// Allocated filesystem space, not bytes read or written over time. + pub disk_bytes: Option, +} + +impl Default for PhysicalResources { + fn default() -> Self { + Self { + cpu: Cpu::default(), + peak_memory_bytes: None, + retained_memory_bytes: None, + scan_bytes: None, + serialized_bytes: None, + disk_bytes: None, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Distinct CPU payloads reject each other's units at the wire boundary; + /// measured phase metadata survives without filling unknown phases. + #[test] + fn cpu_units_and_measurement_metadata_remain_distinct() { + let modeled = ModeledCpu { cpu_ops: 12.0 }; + assert!( + serde_json::from_value::(serde_json::to_value(modeled).unwrap()).is_err() + ); + let measured = MeasuredCpu { + update_cpu_ns: Some(Measurement { + value: 12.0, + stddev: Some(0.5), + samples: 5, + method: Some("test process CPU clock".into()), + }), + ..Default::default() + }; + let encoded = serde_json::to_value(&measured).unwrap(); + assert!(serde_json::from_value::(encoded.clone()).is_err()); + assert_eq!( + serde_json::from_value::(encoded).unwrap(), + measured + ); + assert!(measured.build_cpu_ns.is_none()); + assert!(measured.read_cpu_ns.is_none()); + } + + /// Default resources preserve unavailable dimensions instead of inventing zeros. + #[test] + fn missing_dimensions_remain_unavailable() { + let resources = PhysicalResources::, u64>::default(); + assert_eq!(resources.cpu, None); + assert_eq!(resources.peak_memory_bytes, None); + assert_eq!(resources.retained_memory_bytes, None); + assert_eq!(resources.scan_bytes, None); + assert_eq!(resources.serialized_bytes, None); + assert_eq!(resources.disk_bytes, None); + } + + /// Storage occupancy and scan traffic are independent even though both use bytes. + #[test] + fn byte_dimensions_round_trip_independently() { + let resources = PhysicalResources { + cpu: Some(12.0), + peak_memory_bytes: Some(100), + retained_memory_bytes: Some(70), + scan_bytes: Some(200), + serialized_bytes: Some(40), + disk_bytes: Some(4096), + }; + let json = serde_json::to_value(&resources).unwrap(); + let decoded: PhysicalResources, u64> = serde_json::from_value(json).unwrap(); + assert_eq!(decoded, resources); + } +} diff --git a/docs/developer_docs/offline-comparison-evidence.schema.json b/docs/developer_docs/offline-comparison-evidence.schema.json index 52c0a5d9..8b579dc2 100644 --- a/docs/developer_docs/offline-comparison-evidence.schema.json +++ b/docs/developer_docs/offline-comparison-evidence.schema.json @@ -98,6 +98,7 @@ "$ref": "offline-sketch-evidence.schema.json#/$defs/provenance" }, "metrics": { + "description": "Flat v1 exact-reference wire representation of shared PhysicalResources; empty_build_cpu_ns maps to the shared build_cpu_ns field.", "type": "object", "additionalProperties": false, "properties": { @@ -121,6 +122,17 @@ } ] }, + "merge_cpu_ns": { + "description": "Optional measured merge CPU nanoseconds. Its presence alone does not establish post-merge accuracy or enable merged-state recommendations.", + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, "prepare_cpu_ns": { "anyOf": [ { @@ -151,6 +163,39 @@ } ] }, + "serialized_bytes": { + "description": "Optional logical encoded snapshot size in bytes; omitted when unavailable by the compatibility serializer.", + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "disk_bytes": { + "description": "Optional allocated filesystem bytes; distinct from scan traffic and serialized length. Omitted when unavailable by the compatibility serializer.", + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, + "scan_bytes": { + "description": "Optional bytes read by scan operations; omitted when unavailable by the compatibility serializer.", + "anyOf": [ + { + "$ref": "offline-sketch-evidence.schema.json#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, "peak_bytes": { "anyOf": [ { diff --git a/docs/developer_docs/offline-sketch-evidence.md b/docs/developer_docs/offline-sketch-evidence.md index 9fb814c4..cd331e57 100644 --- a/docs/developer_docs/offline-sketch-evidence.md +++ b/docs/developer_docs/offline-sketch-evidence.md @@ -12,6 +12,42 @@ wire format. `crates/asap-aware-mapping/tests/data/offline-evidence-synthetic.js is an explicitly fabricated format fixture, never benchmark evidence. Runtime validation additionally checks cross-field constraints and matching context. +Resource values share the internal `asap_types::resources::PhysicalResources` container. Its CPU payload preserves units: `ModeledCpu { cpu_ops: f64 }` +represents modeled operations, while `MeasuredCpu` contains optional measured +`build_cpu_ns`, `update_cpu_ns`, `merge_cpu_ns`, `prepare_cpu_ns`, and `read_cpu_ns` +values. `Measurement` is defined in the shared types crate; +`MeasuredResources` is `PhysicalResources`. Sharing +the container does not convert modeled CPU operations into measured nanoseconds. + +`ResourceMeasurements` and `ExactResourceMeasurements` retain only a public +`resources` value of that shared measured type and provide v1 wire compatibility. +Rust consumers access measured CPU through `metrics.resources.cpu` and byte +dimensions through `metrics.resources`. The JSON remains flat: there is no new +`resources` or `cpu` object inside `metrics`. These names map as follows: + +| Shared internal field | Sketch v1 JSON field | Exact-reference v1 JSON field | +| --- | --- | --- | +| `cpu.build_cpu_ns` | `build_cpu_ns` | `empty_build_cpu_ns` | +| `cpu.update_cpu_ns` | `update_cpu_ns` | `update_cpu_ns` | +| `cpu.merge_cpu_ns` | `merge_cpu_ns` | `merge_cpu_ns` | +| `cpu.prepare_cpu_ns` | `prepare_cpu_ns` | `prepare_cpu_ns` | +| `cpu.read_cpu_ns` | `read_cpu_ns` | `read_cpu_ns` | +| `retained_memory_bytes` | `retained_bytes` | `retained_bytes` | +| `peak_memory_bytes` | `peak_bytes` | `peak_bytes` | +| `scan_bytes` | `scan_bytes` | `scan_bytes` | +| `serialized_bytes` | `serialized_bytes` | `serialized_bytes` | +| `disk_bytes` | `disk_bytes` | `disk_bytes` | + +Existing v1 field names and null behavior are unchanged. Sketch records can +add optional `prepare_cpu_ns` and `scan_bytes`; exact references can add optional +`merge_cpu_ns`, `serialized_bytes`, `disk_bytes`, and `scan_bytes`. These new +fields are omitted when unavailable by the compatibility serializers and accept +either a `Measurement` or null on input. They use the same numeric, sample-count, +and uncertainty validation as existing measurements. Old artifacts need no +rewrite or schema-version change. Representing a resource dimension does not +by itself add a workload operation or establish its semantic applicability. + Deserialize an artifact and an `EvidenceContext`, then construct an `EmpiricalEvidenceProvider::new(artifact, context)`. Construction validates schema version, configuration, provenance and numeric values. `lookup(algorithm, params)` @@ -21,16 +57,18 @@ missing, incompatible or ambiguous measurement returns a typed error; none of these conditions supplies a zero cost. Select an explicit context for each distribution or machine; the provider does not interpolate between datasets. -Each resource is an optional `Measurement` with `value`, optional `stddev`, +Each measured resource is an optional `Measurement` with `value`, optional `stddev`, `samples`, and optional `method`. CPU fields are process CPU nanoseconds per operation; `build_cpu_ns` measures empty construction. Building an ingested snapshot additionally requires `sample_count × update_cpu_ns`; the lifecycle helper returns that sum only when both measurements exist. Memory and disk -fields are bytes. Producer methods must state what +fields are bytes; `scan_bytes` records bytes read by scans, not storage occupancy. +Producer methods must state what was measured and how normalization was performed. `retained_bytes` is distinct from `peak_bytes`, `serialized_bytes`, and `disk_bytes`. Counter payload size does not establish allocator footprint, process RSS or on-disk storage. Absent -measurements serialize as null. `stddev: null` means uncertainty was not measured, +measurements preserve the v1 null behavior, except the newly optional fields +listed above are omitted when unavailable. `stddev: null` means uncertainty was not measured, not that variability is zero. A zero measurement must have actual evidence. The record retains the complete command, dataset identity, implementation diff --git a/docs/developer_docs/offline-sketch-evidence.schema.json b/docs/developer_docs/offline-sketch-evidence.schema.json index 732de8b3..1622155e 100644 --- a/docs/developer_docs/offline-sketch-evidence.schema.json +++ b/docs/developer_docs/offline-sketch-evidence.schema.json @@ -174,6 +174,7 @@ ] }, "metrics": { + "description": "Flat v1 wire representation of shared PhysicalResources; internal resource nesting does not change this JSON layout.", "type": "object", "additionalProperties": false, "properties": { @@ -218,6 +219,17 @@ } ] }, + "prepare_cpu_ns": { + "description": "Optional measured preparation CPU nanoseconds. Omitted when unavailable by the compatibility serializer.", + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, "retained_bytes": { "anyOf": [ { @@ -248,6 +260,17 @@ } ] }, + "scan_bytes": { + "description": "Optional bytes read by scan operations; distinct from retained memory and allocated disk space. Omitted when unavailable by the compatibility serializer.", + "anyOf": [ + { + "$ref": "#/$defs/measurement" + }, + { + "type": "null" + } + ] + }, "disk_bytes": { "anyOf": [ { From a80dab7e2a4938b30db89740bef905eab179c26d Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 12:19:01 -0600 Subject: [PATCH 9/9] test(cost): avoid needless borrowing in shared resource fixture --- crates/types/src/resources.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/types/src/resources.rs b/crates/types/src/resources.rs index b4937043..894e3465 100644 --- a/crates/types/src/resources.rs +++ b/crates/types/src/resources.rs @@ -124,7 +124,7 @@ mod tests { serialized_bytes: Some(40), disk_bytes: Some(4096), }; - let json = serde_json::to_value(&resources).unwrap(); + let json = serde_json::to_value(resources).unwrap(); let decoded: PhysicalResources, u64> = serde_json::from_value(json).unwrap(); assert_eq!(decoded, resources); }