Commit graph

5 commits

Author SHA1 Message Date
Cursor Agent
9c960a350e
OH4+ — apontar benchmark-ops-snapshot a buildOpsSnapshot (#186)
Refatora scripts/benchmark-ops-snapshot.mjs para consumir o builder
canônico buildOpsSnapshot, eliminando ~200 linhas de mappers/selects
duplicados que podiam divergir do endpoint GET /campanha/api/ops-sync.

Adiciona callback opcional onSectionLoaded em buildOpsSnapshot para
relatório por-collection (rows, queryMs, truncamento) sem overhead em
produção quando o callback não é passado.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:58:36 +00:00
Cursor Agent
59907172f7
refactor(OH4): parallel snapshot queries + simplify reuse
Promise.all for collection finds; reuse requireRelationshipId /
populatedContactName / campaignAccess; truncate in lib; auth message
canonical. Register OH4+ (#186) for benchmark→builder DRY.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 23:36:57 +00:00
Cursor Agent
e3c7ea297f
style: format OH3 benchmark files 2026-08-01 22:27:25 +00:00
Cursor Agent
5de3aeeb2e
OH3: pin snapshot policy constants + simplify benchmark script
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:26:44 +00:00
Cursor Agent
c5905bf92c
OH3: benchmark ops snapshot script + truncation policy (50/municipality)
Adds scripts/benchmark-ops-snapshot.mjs with assertLocalDatabase guard,
per-collection bytes/gzip/query timing, municipality_update truncation
(--rows municipality_update=N, default 50), and prod projection anchored
on the 2026-08-01 ~4 MB JSON measurement.

Closes the OH3 acceptance: gzip target ≤ ~2 MB with 50 updates/municipality.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:23:03 +00:00