Repository navigation
harness: declared statistics in workloads, --truth declared, and variants without plans - #269
Merged
Conversation
…ants without plans Step 6a of #267 (decisions D7 and D12): - the declared statistic of a query (Truth, Statistic) and its scoring against the raw samples (QueryTruth, Series) move from aqpbm-usecase to aqpbm_core::accuracy::declared_truth; aqpbm-usecase re-exports them, so use-case specs read as before; - WorkloadQuery has an optional truth field (omitted when absent, so existing workload files and run directories are unchanged); - benchmark-external report takes --truth declared beside --truth <engine>/<variant>: each declared query is scored against its statistic computed from the workload's data, and scores.csv holds every score per query (max, median, points); - variant.json takes plans: false (every workload runs with no plan file, the engine running the query its own way) and run_by_default: false (the variant runs only when named with --variant). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
GordonYuanyc
added a commit
that referenced
this pull request
Nov 25, 2026
… plan Step 6b of #267 (decisions D11, D12), stacked on 6a (#269): - prometheus_api holds what the end-to-end systems share: the Remote Write encoder and sending (moved from systemeval, with a request built from harness samples) and the PromQL instant query over HTTP (moved from systemeval's query module, with extra parameters such as nocache=1). systemeval uses them from there; its output is unchanged. - systemeval::asapquery_backend_server: ASAPQuery-backend as an engine under test. It writes each refresh chunk by Remote Write, closes the panes through the chunk end (watermark), and asks each query's PromQL. It takes no plan file and one arm per server start. - The VictoriaMetrics adapter runs an arm with no plan file (a plans: false variant) the normal way: Remote Write, force_flush, the query's MetricsQL or PromQL text with nocache=1; the workload's metrics are deleted at install and at drop. Its cgroup and config file are optional; a plan arm still needs both. - benchmark-external run takes --engine asapquery-backend with --asapquery-backend-url. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GordonYuanyc
added a commit
that referenced
this pull request
Nov 25, 2026
… plan (#270) * system-bench: ASAPQuery-backend adapter and VictoriaMetrics without a plan Step 6b of #267 (decisions D11, D12), stacked on 6a (#269): - prometheus_api holds what the end-to-end systems share: the Remote Write encoder and sending (moved from systemeval, with a request built from harness samples) and the PromQL instant query over HTTP (moved from systemeval's query module, with extra parameters such as nocache=1). systemeval uses them from there; its output is unchanged. - systemeval::asapquery_backend_server: ASAPQuery-backend as an engine under test. It writes each refresh chunk by Remote Write, closes the panes through the chunk end (watermark), and asks each query's PromQL. It takes no plan file and one arm per server start. - The VictoriaMetrics adapter runs an arm with no plan file (a plans: false variant) the normal way: Remote Write, force_flush, the query's MetricsQL or PromQL text with nocache=1; the workload's metrics are deleted at install and at drop. Its cgroup and config file are optional; a plan arm still needs both. - benchmark-external run takes --engine asapquery-backend with --asapquery-backend-url. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * system-bench: apply the independent review of the end-to-end adapters - Answers of an arm without a plan follow the harness's keys: prometheus_api::query_text_arm drops __name__ unless the query is a bare selector, keeps non-finite values and refuses two answers for one series, as the plan arm does; both adapters use it. - Each chunk is written in time order (as systemeval does), so a later metric of the chunk does not move the server's watermark past an earlier one. - ASAPQuery-backend's footprint reads asap_view_bytes and asap_raw_data_bytes from /metrics; its adapter moves to engines_external beside the other server adapters, and both adapters need a cgroup again. - VictoriaMetrics: the stream-aggregation config is needed only by arms with a plan file (the flag is optional); one connection type (VictoriaMetricsConnection, formerly Http) with one force_flush. - Tests: __name__, NaN, duplicates, write order over three batches, a busy answer, the footprint, one VictoriaMetrics arm at a time, the fake engine refusing server flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 6a of #267 (decisions D7 and D12). The harness part only; the adapters and systemeval come in the next two pull requests.
What changes
aqpbm-core.Truth,Statistic,Seriesand the scoring of answers against a statistic computed from the raw samples (QueryTruth) move fromaqpbm-usecasetoaqpbm_core::accuracy::declared_truth.aqpbm-usecasere-exports them, so use-case specs and the planeval/systemeval outputs are unchanged.WorkloadQuery.truth(optional): a query can declare the statistic it computes. Omitted when absent, so existing workload files and run directories read and write as before.benchmark-external report --truth declaredbeside--truth <engine>/<variant>:summary.csvandaccuracy.csvkeep their columns. Relative error follows the harness's rule (relative_error); points and missing points count every declared query, quantile and top-k included;scores.csv: every score per query (max, median, points), for example rank error for quantiles.variant.jsontakes two optional fields:plans: false: every workload runs with no plan file; the engine runs the query its own way (PlanEntry::QueryTextOnly,engine_options = {});run_by_default: false: the variant runs only when named with--variant. If no variant runs by default and none is named, the run is refused.reporttakes aReportTruth.Notes
run_by_defaultbelongs to the variant, so it applies to every engine in the run directory. An engine with no plan-free mode (ClickHouse, VictoriaMetrics before step 6b) recordsNotRunfor aplans: falsevariant.WorkloadQueryliterals; it needstruth: Nonewhen it moves its pin (step 5).Checked (macOS)
cargo fmt --check.cargo clippy --workspace --all-targets --all-features -- -D warnings: only the two pre-existing Linux-only warnings inaqpbm-core/tests/harness_protocol.rs.--truthparsing). The failures are the known Linux-only ones (thread pinning, cgroup,/proc), the same as on main.🤖 Generated with Claude Code