perf(tests): profile statistics and occupancy fixture costs before optimization #240
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#240
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Measure fixture and synthetic-data costs in the statistics and occupancy tests, then optimize only a demonstrated bottleneck without changing domain semantics. No specific saving or batching implementation is established yet.
Measured research
Source: docs/research/217-test-performance-and-agent-workflows.md (PR #218, research #217).
For the selected 19-test API/summary workload, median cumulative time over three profiles was 3.077s for init_db, 2.880s for seeding, 1.310s for authentication and 0.091s for record_event. Seeding is nested inside initialization; these rows cannot be added independently. This subset does not profile the whole suite.
The former claim that 80%+ of wall time is unbatched INSERTs and the promised 15–20s saving are withdrawn. record_event_async also updates camera counters and telemetry: inserting only event rows would lose those semantics. Closed/checkpointed template-copy measurements are candidates, not proof of suite-wide savings.
Next steps / acceptance criteria
Needs triage: measurements must determine the implementation scope before this is ready for an agent.
perf(tests): batch synthetic time-series insertions in statistics test fixturesto perf(tests): profile statistics and occupancy fixture costs before optimization