fix(projection): align projection with ADR 0002
Use lifetime written bytes from the current segment's newest published sample in the headline formula, select the Percentage-Used-implied baseline after two increments in the segment (otherwise show the too-coarse fact), and judge horizon agreement across existing horizons. Make the vacuous projection tests assert unconditionally and add coverage for implied-baseline gating and single-horizon agreement.
This commit is contained in:
@@ -78,8 +78,8 @@ def _insert_day(conn, day, bw=1024*1024*100, coverage=0.95, samples=24):
|
||||
def _insert_sample(conn, ts, pu=5):
|
||||
conn.execute(
|
||||
"INSERT INTO samples (ts, device, data_units_written, data_units_read, "
|
||||
"percentage_used, bytes_written, bytes_read, power_on_hours) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
||||
"percentage_used, bytes_written, bytes_read, power_on_hours, segment_id) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1)",
|
||||
(ts, "/dev/nvme0n1", 1000000, 500000, pu, 512000000000, 256000000000, 8765),
|
||||
)
|
||||
conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user