[Bug] The lexicon performance test asserts on an average, not a best-of-N #638
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#638
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?
Found in the pre-publication test review.
Evidence:
test/privacy_bulk_lexicon_test.dart:246-257runs 20 scans back to back and asserts the average againstlessThan(5)ms.test/large_deck_performance_test.dart:112-121solves the same problem correctly withfastestOf(3)— "returns the fastest run". There is noTimeout(in any test file, anddart_test.yamldefines no retry, tag or isolation for either of these.Why this matters: an average over 20 runs is more sensitive to a single outlier than a minimum over 3, and under a full suite (516 test files, parallel isolates) that is the classic wall-clock trip. The first contributor running
make checkon a loaded laptop gets a red privacy performance test for a change to, say, a dialog — a failure with nothing to do with their work, which is the fastest way to teach someone that the gate is noise.Proposal: move
fastestOffromlarge_deck_performance_test.dartintotest/support/and reuse it here:final perScan = fastestOf(5, () => lexicon.findIn(text));. Same assertion, same threshold, no noise sensitivity.