perf: round 11 finale — benchmark verdicts, geo min(uuid) rollback, ROUND11.md
- benches/ROUND11.md: final BEFORE/AFTER numbers for all 21 micro sections, the 5 query sections, the 4 log-writer arms, the SPA gates, and the two cross-round regression guards (bench_row_path 2.52x, bench_dto_map — both byte-identical) - ROLLBACK (gate-caught): min(fm.file_id)::text geo-cluster cast — PostgreSQL has no min(uuid) aggregate; the bench section now reproduces the rejection and the per-row-cast original stays - REJECTED (bench-measured): tracing-appender non-blocking writer — slower than sync on fast sinks (1.41M vs 0.99M ev/s, worse tail) and the slow-sink drain gate showed shutdown tail-loss risk for the audit channel; dep moved to dev-dependencies (harness only) - RateLimiter final form: lock-free get + insert (8.0 → 6.0 allocs, wall neutral; and_upsert_with variant rejected at 2 365 ns) - fix: TrashedItemParts insertion had stolen TrashedItem's derive line (caught by clippy --all-targets) - grant_role enum values corrected in the queries bench Validation: cargo fmt + clippy --all-features --all-targets -D warnings clean; cargo test --workspace 524 passed / 0 failed; frontend npm run check 0 errors + vitest 306 passed (1 pre-existing round-7 wall-clock gate flaked only under concurrent Rust-build CPU contention; passes in isolation) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ABhTEHuGujvwoodh67Kga7
This commit is contained in:
@@ -7,7 +7,6 @@ pub enum TrashedItemType {
|
||||
Folder,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
/// Owned decomposition of a [`TrashedItem`] (see
|
||||
/// [`TrashedItem::into_parts`]).
|
||||
pub struct TrashedItemParts {
|
||||
@@ -19,6 +18,7 @@ pub struct TrashedItemParts {
|
||||
pub trashed_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TrashedItem {
|
||||
id: Uuid,
|
||||
original_id: Uuid,
|
||||
|
||||
@@ -625,10 +625,12 @@ impl FileBlobReadRepository {
|
||||
SELECT count(*) AS n,
|
||||
avg(fm.longitude) AS clng,
|
||||
avg(fm.latitude) AS clat,
|
||||
-- Cast once per cluster, not once per row: uuid byte
|
||||
-- order == canonical-text order, so the chosen sample
|
||||
-- is identical (benches/ROUND11.md §Q4).
|
||||
min(fm.file_id)::text AS sample_id
|
||||
-- NOTE: `min(fm.file_id)::text` (cast per cluster, not
|
||||
-- per row) was attempted in ROUND11 §Q4 and REJECTED by
|
||||
-- its benchmark gate: PostgreSQL has no `min(uuid)`
|
||||
-- aggregate, and adding a custom one is schema surface
|
||||
-- this viewport query doesn't justify.
|
||||
min(fm.file_id::text) AS sample_id
|
||||
FROM storage.file_metadata fm
|
||||
JOIN storage.files fi ON fi.id = fm.file_id
|
||||
WHERE fi.drive_id IN (
|
||||
|
||||
Reference in New Issue
Block a user