The bench gate times a request whose whole envelope an ignore entry hides #146
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?
crates/jellyfin-bench/src/gate.rskeeps a request when the ignore list leavesnothing behind:
An entry that hides the whole envelope — status, content type and body — makes a
pair of responses comparable that is not. The gate's own reason for existing is
that timing two servers which answered different things measures the router
rather than the work, and the harness prints exactly that count per run
(
report.rs'sagreed_without_answering); the gate reads it only for ashared non-
2xx, not for a difference an entry suppressed.The one entry with that shape today is the idle scheduled-task cancel added in
#125, where upstream throws through its exception middleware and this server
does nothing at all. So the reachable case is benching
tasks.json, whichnothing does — this is filed before it is reachable rather than after.
Where to start
gate.rs. The question is whether an entry-suppressed envelope differenceshould be a reason to drop a request from the timed set, the way an unanswered
pair already is. A field-scoped entry on a body field is not the same thing: the
two servers still both answered, and timing them is honest.
Appliedalready carriessuppressedwith theRuleon each, so the gate canask what was hidden without a new mechanism.
How to know it is done
cargo xtask benchover a scenario carrying such a request drops it, says so inreport.mdthe way it says what else it dropped, and the count is not zero on arun that includes one.
House rules
Tests run under
cargo nextest.crates/jellyfin-harness/README.mdsays what adiff means and what an entry must carry;
crates/jellyfin-benchis what readsthe same rule for timings.
The gate now drops a request whose envelope an entry hid, and says how many.
a178908.What it is
The envelope paths are named beside
recording::compare, which writes them, sothe gate and the diff cannot drift apart:
@lengthand@rangeare deliberately not envelope: both servers sent a bodyof the same kind and only its measurements differ, which is the resized-image
entry and not this.
gate.rskeeps a request only whenapplied.keptis emptyand nothing entry-hidden touched the envelope; otherwise it drops it, tags
it
hidden_envelope, and lists the suppressed difference ashidden by an entry — @status: upstream 500, ours 204.Gate::hidden_envelope()counts them, and
Report::renderprints the count above the dropped lines.crates/ephyra-harness/README.mdcarries the rule beside the one aboutrequests neither server answered.
Tested
an_entry_over_the_whole_envelope_leaves_nothing_to_time— the #125 entry'sown shape, upstream 500
text/plainagainst our 204 empty: three differencessuppressed, all three envelope.
an_entry_on_a_body_field_leaves_a_request_to_time—traceId. Bothanswered; timing them is honest.
an_entry_on_a_bodys_length_leaves_a_request_to_time—@lengthon aresized picture. Same.
a_run_says_how_many_requests_an_entry_took_out_of_the_timed_set— the countand the line reach
render().Not done
The end-to-end half of "how to know it is done" —
cargo xtask benchover ascenario carrying such a request, with a non-zero count in the report. It is
still unreachable for the reason the issue was filed with: the only entry with
that shape is the idle scheduled-task cancel, and nothing benches
tasks.json.Adding it to the bench manifest is the step that would make the run possible,
and that is a scope decision this issue declined. Leaving open for it.
Measured, and closing.
Benching
tasks.jsonwas the wrong way to satisfy this. The gate's job is todrop that request, so the scenario would time nothing and exist only to make
a counter non-zero. What was actually worth knowing is whether the new rule
removes anything from a set a run already times — and
bundle, which is inDEFAULT_WORKLOADS, is the scenario that can answer it: it is the only onethat asks for
/Plugins,/Packages,/RepositoriesandExternalIdInfos,the four routes whose entries are
fields: ["**"], scope: "field". A**pattern matches
@status,@content-typeand@body, so if the two serversdisagreed on an envelope there, this change would have silently stopped timing
those requests.
cargo xtask bench --workload bundleover thedefaultfixture:Both drops are body differences that were already dropping before. Every
hidden_envelopeis false, the count line does not print, and all fourwildcard-entry routes were kept. The rule costs the timed set nothing.
Two caveats on the run, neither affecting the count: upstream was started with
a stock ffmpeg rather than the pinned one, because the copy under
reference/published/ffmpeghas an absoluteRPATHof/usr/lib/jellyfin-ffmpeg/liband cannot load its libraries out of the tree —bundleasks for no encoding, so nothing it replays reaches an argumentbuilder. And the two drops above are artifacts of running upstream natively out
of a bench state directory rather than the container's
/config.The rule and its reporting are covered by four tests that fail when the
predicate or the count is wrong:
an_entry_over_the_whole_envelope_leaves_nothing_to_time,an_entry_on_a_body_field_leaves_a_request_to_time,an_entry_on_a_bodys_length_leaves_a_request_to_time, anda_run_says_how_many_requests_an_entry_took_out_of_the_timed_set.