A scan has never been timed beside upstream's, and no fixture can be #192
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?
#92measures a scan of ours alone. Nothing has ever timed the same scan onupstream beside it, and neither fixture this project has can be asked to.
the media files. A scan of it finds nothing to scan.
scan of it finishes in the noise, and the number would describe the walk
rather than the work.
upstream is standing on it.
So this is not a request set and not a run: it needs a library both servers can
be pointed at, big enough that the scan is the measurement, and an arrangement
that gives each the same media without one warming the other's file cache
first. A scan is also not a load — it is one timed operation per server, with a
progress endpoint to poll, so
ephyra-benchis the wrong tool andcargo xtaskis where the driving would go.Worth settling before any of it: whether a scan comparison is worth a fixture
of its own at all, given that the scan's own numbers (
#92) already say wherethe time goes.
How to know it is done
A full scan of one library, timed on both servers on the same host with the
same media, with what each wrote afterwards compared — the item count, the
people, and the pictures — so that a faster scan that did less work is not
read as a faster scan.
House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin.Measured, with machinery that commits:
cargo xtask scan-race(2055c06).The fixture problem this issue names is real, so the run makes its own: both
servers start from nothing — an empty data directory, the startup wizard,
one library — over a tree of films hard linked from a clip the reference media
already holds. The walk, the naming rules, the probe and the writes are all
real work on real files; only the decoded picture is repetitive, which is the
one thing a scan does not branch on.
Both file the same number of rows, which is the check that a faster scan is not
a smaller one. Ours is 10% slower at three hundred films and 40% slower at two
thousand — it loses ground as the library grows, which is the shape of
per-item work rather than a fixed cost. Cold start is the other way round: 212 ms
against 3.8 s.
So the answer to what this issue asked to settle — whether a scan comparison is
worth a fixture of its own — is yes, and it did not need the fixture the issue
imagined. What it needs next is where those 14 seconds go, which is
#92'squestion asked against a second server rather than in isolation.
One thing the run turned up on the way, filed as
#193: a server whoseconfiguration declares fewer libraries than its database holds fails its whole
scan on a foreign key. That is what made the first attempt at this measurement
answer zero items.