Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
bd516c5
Restack PR #766 with implementation before standalone acceptance
zzylol Sep 26, 2026
3cff013
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
1b8dcf0
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
bd7d8ad
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
f84f554
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
ab22b98
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
4f284d0
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
8eb0efc
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
bd3f4a6
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
edaa9ee
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
30516eb
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
b387902
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
4df1344
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
7a70c45
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
bc532c5
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
1b723e9
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
4b38704
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
e61625b
Merge branch 'standalone/stack-765' into standalone/stack-766
zzylol Sep 26, 2026
bbc134f
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
ad85369
merge: align performance branch with semantic SDS bindings
zzylol Sep 26, 2026
a8a90fb
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
9cc9e7c
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
a9aa171
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
d4425ea
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
d28d664
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
d42e955
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
36dbd89
Merge branch 'impl/sds-stack-765' into impl/sds-stack-766
zzylol Sep 26, 2026
f11502f
perf: identify architecture stages and retain bound-plan artifacts
zzylol Sep 27, 2026
2df86ab
Merge commit '49fcd88e' into impl/sds-stack-766
zzylol Sep 27, 2026
2c8857c
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
fcbaf4b
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
50b5be8
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
fcabecb
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
8f91261
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
ff5a4d4
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
d862dfc
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
131df9f
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 27, 2026
347ba6a
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
817065f
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
a95e436
Explain runtime inspection for query and precomputed Rate candidates
zzylol Sep 28, 2026
5c83899
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
5ec9229
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
fdf67b5
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
d990fd6
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
94c25b6
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
c9cf803
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
f96bd3e
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
5f6f4e5
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
a83c14c
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
e1ef115
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
7836f7b
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
0758a91
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
6305533
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
d05695f
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
927492d
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
acfd8fa
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
4359c79
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
64222a7
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
715e91e
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
2a5a26a
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
2114562
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
63d3d51
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
860a902
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
d93d714
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
279ae0e
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
dd230d1
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
88e4794
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
6243857
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
7982693
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
a7bc744
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
635890e
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
65f01d5
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
656a902
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
eade5f1
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
248a623
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
b91d012
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
059a28c
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
871f4ab
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
25bb6ea
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
4e17dcf
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
ed2d59b
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
82c90bf
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
4150668
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
5f3798d
Merge branch 'impl/sds-stack-761' into impl/sds-stack-766
zzylol Sep 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/overhead-inspection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Runtime overhead contracts
on:
pull_request:
paths:
- 'data_plane/**'
- 'crates/asap_types/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/overhead-inspection.yml'
workflow_dispatch:
jobs:
contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- run: cargo test --locked -p data_plane --lib runtime_config::tests
- run: cargo test --locked -p data_plane --example overhead_inspect
- run: >-
cargo run --locked -p data_plane --example overhead_inspect --
--workers 1,2 --concurrency 1,2 --requests 20 --warmup 2 --repeats 1
--log-level off --disable-console-log --disable-file-log
--output target/overhead-smoke
- uses: actions/upload-artifact@v4
if: always()
with:
name: overhead-smoke
path: target/overhead-smoke
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions data_plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ fs2 = "0.4"
# none of them.

[dev-dependencies]
libc = "0.2"
asap-aware-mapping.workspace = true
tempfile = "3.20.0"
criterion = { version = "0.5", features = ["html_reports"] }
Expand Down
177 changes: 177 additions & 0 deletions data_plane/examples/overhead/fixture.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
use anyhow::{ensure, Result};
use asap_sketchlib::{DdSketch, MessagePackCodec};
use data_plane::drivers::query::{
adapters::AdapterConfig, servers::http::validate_and_build_runtime_plan,
};
use data_plane::query_engines::{
routing::query_engine_routing::QueryEngine, QueryForwardingPolicy, QueryResult,
};
use data_plane::storage_engines::{
sketch_db::index::*,
types::{ActivePhysicalPlanHandle, BackendStorageRouting},
};
use data_plane::{ASAPQueryEngine, HttpServer, HttpServerConfig};
use std::{
collections::{BTreeMap, BTreeSet},
sync::Arc,
time::Instant,
};

#[path = "../../tests/support/physical_fixture.rs"]
#[allow(dead_code)]
mod physical_fixture;

pub const QUERY: &str = "quantile_over_time(0.5, overhead_values[1s])";
pub const TIME: u64 = 600_000;
pub struct Fixture {
pub raw: Vec<f64>,
pub sketch: DdSketch,
pub expected: f64,
pub exact_expected: f64,
pub engine: Arc<ASAPQueryEngine>,
pub server: HttpServer,
pub setup_seconds: BTreeMap<&'static str, f64>,
pub installed_plan: serde_json::Value,
}
pub fn exact(values: &[f64]) -> f64 {
let mut sorted = values.to_vec();
let middle = sorted.len() / 2;
let (_, upper, _) = sorted.select_nth_unstable_by(middle, f64::total_cmp);
let upper = *upper;
if sorted.len().is_multiple_of(2) {
(sorted[..middle]
.iter()
.copied()
.max_by(f64::total_cmp)
.unwrap()
+ upper)
/ 2.0
} else {
upper
}
}
impl Fixture {
pub fn new(samples: usize) -> Result<Self> {
ensure!(samples > 0, "samples must be positive");
let mut setup_seconds = BTreeMap::new();
let started = Instant::now();
// Deliberately unsorted, reproducible input; exact includes scratch allocation
// and selection, while prebuilt sketch construction is outside measurement.
let raw: Vec<_> = (0..samples)
.map(|i| 1.0 + ((i * 7919) % 10007) as f64)
.collect();
setup_seconds.insert("fixture.raw_input", started.elapsed().as_secs_f64());
let started = Instant::now();
let mut sketch = DdSketch::new(0.01);
for value in &raw {
sketch.update(*value);
}
setup_seconds.insert(
"fixture.direct_sketch_build",
started.elapsed().as_secs_f64(),
);
let expected = sketch.quantile(0.5).unwrap();
let exact_expected = exact(&raw);
ensure!(
(expected - exact(&raw)).abs() <= exact(&raw) * 0.02,
"sketch accuracy gate failed"
);
let config: asap_types::PrecomputeMaterialization = serde_json::from_value(
serde_json::json!({
"aggregation_type":"DDSketch", "aggregation_sub_type":"", "metric":"overhead_values",
"window_size":1,"slide_interval":1,"window_type":"tumbling","num_aggregates_to_retain":10,
"parameters":{"alpha":0.01},"pane_origin_ms":0,"partitioning":"per_entity",
"window_layout":{"kind":"pane","pane_secs":1},"grouping_labels":{"labels":[]},
"aggregated_labels":{"labels":[]},"rollup_labels":{"labels":[]},
"spatial_filter":"","spatial_filter_normalized":"","original_yaml":""
}),
)?;
let started = Instant::now();
let plan = physical_fixture::artifact_from_materializations(vec![config.clone()]);
setup_seconds.insert("fixture.bound_plan", started.elapsed().as_secs_f64());
let installed_plan = serde_json::to_value(&plan)?;
let started = Instant::now();
let store = Arc::new(SketchStore::new());
store
.install_precompute_plan(
Arc::new(plan.summary_catalog.clone()),
&plan.precompute_plan,
)
.map_err(anyhow::Error::msg)?;
setup_seconds.insert("sds.install_catalog", started.elapsed().as_secs_f64());
let started = Instant::now();
let skconfig = SketchConfig::DDSketch {
relative_accuracy: 0.01,
};
store.register(SummarySeriesMetadata {
storage_handle: 1,
metric_name: "overhead_values".into(),
group_by_keys: BTreeSet::new(),
capability: Some(Capability::QuantileApprox(Some(SketchAlgorithm::DDSketch))),
accuracy: Some(AccuracyBound::from_config(&skconfig)),
agg_kind: AggKind::Sketch {
algorithm: SketchAlgorithm::DDSketch,
config: skconfig,
spatial_filter_canonical: String::new(),
},
first_seen_unix_ms: 0,
retired_at_ms: None,
expires_at_ms: None,
policy_fp: config.policy_fingerprint(),
});
ensure!(
store.append_sample(
1,
BTreeMap::new(),
(TIME - 1000, TIME),
SketchSampleState {
bytes: sketch.to_msgpack().map_err(|e| anyhow::anyhow!("{e}"))?,
encoding: SketchEncoding::MsgpackFull,
}
),
"sample admission failed"
);
setup_seconds.insert("sds.register_and_publish", started.elapsed().as_secs_f64());
let started = Instant::now();
let active = ActivePhysicalPlanHandle::new(
validate_and_build_runtime_plan(plan, Arc::new(BackendStorageRouting::empty()))
.map_err(anyhow::Error::msg)?,
);
setup_seconds.insert(
"deployment.validate_and_activate",
started.elapsed().as_secs_f64(),
);
let engine = Arc::new(
ASAPQueryEngine::new(1000)
.with_sketch_index(store.clone())
.with_active_physical_plan(active)
.with_query_forwarding_policy(QueryForwardingPolicy::Disabled),
);
let server = HttpServer::new(
HttpServerConfig {
port: 0,
handle_http_requests: true,
adapter_config: AdapterConfig::prometheus_promql(String::new(), false)
.with_query_forwarding_policy(QueryForwardingPolicy::Disabled),
},
engine.clone(),
store,
);
Ok(Self {
raw,
sketch,
expected,
exact_expected,
engine,
server,
setup_seconds,
installed_plan,
})
}
pub async fn backend(&self) -> Result<f64> {
match self.engine.execute_at(QUERY, TIME).await? {
QueryResult::Vector(v) if v.values.len() == 1 => Ok(v.values[0].value),
other => anyhow::bail!("unexpected result {other:?}"),
}
}
}
Loading
Loading