Explore report · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/12bc75d5-bce8-4665-ad48-680a351e23a4.md

PR #548 — Add request latency histograms and process metrics (case file)

Repository: NVIDIA/hyperflare-inference · PR: https://github.com/NVIDIA/hyperflare-inference/pull/548 Author: WynnD (git name Wynn Drahorad; Discord oystersmiles; GitHub association NONE) State: draft, base main, head ebecef1, branched from f377dc8, 8 files +545 / −20, no labels, no reviews, no CI checks on the head commit, opened and last updated 2026-11-26. Closes #536.

Key findings

  1. The queue histogram does not measure what the driving issue asked for. Issue #536 asks for flare_request_queue_seconds = "admission to first scheduled step"; the PR measures runtime arrival → first scheduled step: Incoming.arrival_ns is set inside ModelRuntime::schedule (helios/src/server/runtime.rs:901) and handed to the scheduler at runtime.rs:1471, so HTTP ingress, tokenization and framework preparation are excluded. docs/api.md (PR head, lines 305-307) says "from model-scheduler arrival", but the PR description names neither endpoint, and e2e/TTFR by contrast start at HTTP admission (AdmittedAt, helios/src/server.rs:828, read at http.rs:127). Anyone porting a vLLM dashboard can mis-map this series.
  2. Undeclared asymmetry between the two HTTP histograms. flare_time_to_first_response_seconds is recorded only when the client actually polls the body (FirstResponse::output, http.rs:607 / :638), while flare_request_e2e_seconds is recorded as soon as the handler produces a completed response even if the body is dropped (http.rs:614-617 streaming, :631-632 non-streaming). The phase test first_response_http_nonstream_records_only_when_completed_body_is_offered (phase_tests.rs:4436-4473) pins e2e count = 1 regardless of polling while TTFR follows poll_body, and first_response_http_stream_excludes_pretext_failures_and_unpolled_bodies (phase_tests.rs:4406-4434) pins e2e = 0 on failure. So e2e measures server-side handling, not delivery.
  3. Silent doc repair, plus a new doc inconsistency left standing. The docs hunk adds the already-shipped flare_host_cache_retirement_seconds to a list that on main still reads "The only histograms describe host prefix-store lookups…" (docs/api.md:290-292 on main vs :296-300 at PR head) — an undeclared fix. Conversely the PR adds unprefixed process_* while leaving "Counter and gauge names start with flare_" (docs/api.md:288-289) unamended.
  4. Process metrics exist only on Linux, but Windows is a supported serving target. metrics/process.rs is hand-rolled procfs/getrlimit code with render() a no-op outside Linux (process.rs:9-14); libc is already an unconditional dependency of flare-helios (helios/Cargo.toml:50), so there is no Cargo change, but the description's motivation ("generic Prometheus process dashboards have no process_* series") is resolved only on Linux. The Windows matrix (native-serving builds and tests on windows-2022) would report nothing there. Documented ("Other platforms omit them", docs/api.md:315-318) but easy to miss.
  5. Evidence is partial and no CI has run. Claimed: server::runtime::phase_tests 109 passed, server::metrics:: 20 passed — two module subsets. Explicitly unrun: the Windows build, the full helios suite, and messages_image_hints_end_after_expansion_for_text_and_segmented_templates. The author writes "CI covers the first two", which refers to what native-serving would do (ubuntu-24.04 + windows-2022, .github/workflows/native-serving.yml:56-68 (not opened)), not to a run: no check has executed on ebecef1. The live scrape is one two-GPU DeepSeek-V4.1-Flash instance whose deltas include the serving instance's own agent-session traffic — a self-declared confound ("Counts gained 5 for each runtime histogram and 6 for the first-response histogram" against three named requests).
  6. Everything in the cluster is under a day old and nobody with merge rights has engaged. #536 and #537 were filed the same morning (2026-11-26, 09:03 / 09:07) by Napuh, an account with no merged work in the 180-day window; #548 and #549 were opened the same day by WynnD, also with no merged work. Zero comments, reviews or reactions on any of the four; the only adjacent voice is #541's author jere357. Demand is therefore one requester wide and <1 day old as recorded locally, though docs/TODO.txt:110-124 already carries a standing TODO to measure "request p99" and "request latency measurements".
  7. Two histogram implementations now coexist in one file. The existing host-cache histograms (flare_host_cache_missing_tokens, estimated_transfer_ns, estimated_prefill_ns, retirement_seconds) keep their [AtomicU64; 8] arrays and flare_selene::RETIREMENT_LATENCY_MS bounds (metrics.rs:851-890); the new generic Buckets/Histogram<N> (metrics.rs:214-298) does not absorb them, and the diff does not touch that region.
  8. metrics.rs has three open PRs in flight. #548, #549 (same author, same day) and #542 (FujitsuPolycom), plus #334 touching the file; the description reasons only about #549's overlap. Nothing on main conflicts — no default-branch commit since f377dc8 touches any file this PR changes.

The change

What it does in plain terms: /metrics gains fixed-bucket distributions for how long a request waited, how long prefill and decode took, how long each output token took, how large prompts are, how long the whole HTTP response took and how long until the first answer text appeared; plus the six standard process_* series that Prometheus process dashboards expect. All of it is always on and rendered into the Prometheus text only; the JSON snapshot is unchanged.

File by file (PR #548, head ebecef1):

Verified semantics of each request histogram (Metrics::request_completed, metrics.rs:452-480):

The why

Recent activity

People

Community

Nothing found. pr_comments on #548 returns "No comments" — no reviews, inline comments or reactions; #536 and #537 each show "Discussion (0)". The only links are structural: #536 closes-via #548, #536 mentions #541 and #549, #537 closes-via #549 and mentions #548/#541. Two authors, one issue filer, no maintainer in any thread.

Project fit

Aligned:

In tension:

Claims and evidence

What the description claims, and what backs it:

Claim Backing
server::runtime::phase_tests: 109 passed Author-reported run on Linux x86_64, release, --features runtime-core,server; named tests (reasoning_budget_cuts_… with queue/prefill/prompt counts each 1 after park+readmit; the two first_response_http_* tests; metrics_route_serves_prometheus_or_json_without_the_api_key) are consistent with the test diffs
server::metrics::: 20 passed Author-reported; includes request_histograms_bucket_completed_request_timings (metrics.rs:1654-1700 region), parse_stat_reads_fields_after_a_parenthesized_command_with_a_paren and render_reports_process_memory_descriptors_and_start_time (process.rs:148-183) — both present in the diff
Live scrape shows the series populated One two-GPU DeepSeek-V4.1-Flash instance, repo Dockerfile, swapped into a llama-swap entry; deltas include the serving instance's own agent-session requests (self-declared), so counts (5 per runtime histogram, 6 for TTFR) exceed the three named requests; prompt-token buckets are used to attribute the extra observations (le="64" +1 = the 36-token prompt; le="2048" +4 = two 1831-token prompts plus two session requests). Sums reported: queue 0.169 s, prefill 0.301 s, decode 19.64 s, time-per-output-token 0.039 s, e2e 20.26 s. Final scrape: resident memory 67 666 030 592 B, open fds 276, max fds 1024.
Nothing about serving changes Claimed; no benchmark, and the added cost is not measured or mentioned: one extra monotonic_ns() per completion and one per step per lane in reserve_and_pack, one or two Relaxed atomic adds plus a 21-entry linear scan per completed request, and ~63 AtomicU64 (~500 B) per Metrics instance. Implausible as a throughput risk, but unquantified.
CI covers the Windows build and full suite The native-serving matrix does build+test helios with --features runtime-core,server on ubuntu-24.04 and windows-2022 and sets FLARE_TEST_TEMPLATE_DIR from tests/frontend/prepare_templates.py (not opened) (.github/workflows/native-serving.yml:28-31 (not opened),56-68) — but no check has run on ebecef1.
Merges in either order with #549 Verified plausible from both diffs (disjoint regions of metrics.rs and docs/api.md); not independently tested.
The cherry-pick conflict story Concerns reproducing the live scrape on fork base 5ffe4d54, not the merge target; on main the #507 code is present and the diff neither removes nor relocates it.

Not stated in the description at all: the queue histogram's start point; the e2e/TTFR polling asymmetry; the process_open_fds off-by-one (it counts the directory handle it opens — declared in the help string, process.rs:115-123); the permanent ~190-line growth of every /metrics response with no opt-out; the undeclared flare_host_cache_retirement_seconds doc fix; the two histogram implementations coexisting.

Reach

Process

Open questions / not found