feat: Zeitreihen der Messwerte in SQLite (Schema 3), einmal pro Minute, 7 Tage Aufbewahrung (#1042)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 09:34:48 +01:00
parent 65bf576e90
commit 722467f528
10 changed files with 171 additions and 6 deletions

View File

@ -22,6 +22,7 @@ pub use registry::{ModelEntry, NewLlm, StartPlan};
const MIGRATIONS: &[&str] = &[
include_str!("../migrations/0001_init.sql"),
include_str!("../migrations/0002_logging.sql"),
include_str!("../migrations/0003_metrikproben.sql"),
];
/// Schema-Version, die dieses Crate erzeugt.
@ -216,7 +217,7 @@ mod tests {
.unwrap();
}
let store = Store::open(&pfad).unwrap();
assert_eq!(store.schema_version().unwrap(), 2);
assert_eq!(store.schema_version().unwrap(), LATEST_SCHEMA_VERSION);
let alt = &store.recent_requests(10).unwrap()[0];
assert_eq!(alt.correlation, "req_alt");
assert_eq!(alt.tokens_out, None);