Skip to main content

Crate dsfb_database

Crate dsfb_database 

Source
Expand description

§dsfb-database

Deterministic, read-only structural observer over residual trajectories in SQL database telemetry. Built on the dsfb core (Drift–Slew Fusion Bootstrap) by R. de Beer (2026); this crate adds only the database-specific residual construction and motif grammar.

§What this crate is

dsfb-database consumes residual streams that production SQL engines already emit (pg_stat_statements, pg_stat_io, pg_stat_activity; sys.dm_exec_query_stats, sys.query_store_*; MySQL Performance Schema; Oracle ASH/AWR/V$SQL_PLAN_STATISTICS_ALL) and structures them into a small grammar of operator-legible motif episodes:

  1. plan-regression onset
  2. cardinality-mismatch regime
  3. contention ramp
  4. cache / buffer collapse
  5. workload phase transition

§What this crate is NOT

It does not optimise queries, replace the optimiser, modify execution plans, change DBMS behaviour, or claim causal correctness. See non_claims (re-exported below) — these strings are pinned by a compile-time test (tests/non_claim_lock.rs).

Re-exports§

pub use grammar::Episode;
pub use grammar::MotifClass;
pub use grammar::MotifEngine;
pub use grammar::MotifGrammar;
pub use residual::ResidualClass;
pub use residual::ResidualSample;
pub use residual::ResidualStream;

Modules§

adapters
Dataset adapters.
baselines
Published-baseline change-point detectors for the paper’s §7 bake-off.
grammar
Motif grammar layer.
live_mysql
Live read-only MySQL telemetry adapter (feature = live-mysql).
metrics
Operational evaluation metrics.
metrics_exporter
Phase-C4: Prometheus / OpenMetrics exposition of live engine state.
non_claims
Non-claim charter for DSFB-Database.
perturbation
Perturbation harness.
report
Report generation: CSV + JSON sidecars + plotter PNGs that the LaTeX paper includes verbatim. Every report header embeds the crate version and the non-claim block so a reviewer can verify provenance.
residual
Residual streams.
streaming
Phase-C2: streaming residual construction.

Constants§

CRATE_VERSION
The crate version as recorded in Cargo.toml. Embedded in every report so that figures can be traced back to the exact code that produced them.