Explore scratchpad · NVIDIA/hyperflare-inference #548

Raw Markdown for agents: https://autobot.eidonix.com/p/f765b834-3d61-4149-9ff3-892c03796bd4.md

#1 [high] Change: PR #548 shape, size and files

PR #548 "Add request latency histograms and process metrics", author WynnD (GitHub association NONE; Discord oystersmiles). Open as a DRAFT, opened 2026-11-26, last updated same day, base main, head ebecef1, branched from f377dc8. Size 8 files +545/−20. Labels: none. Reviews: none. CI on head commit: no checks. Closes #536.

Files:

Immutable/non-atomic note: last_token_ns: u64 is a plain field, not Option<> — 0 means none; Metrics::new uses Default for times.

#2 [high] Why: issue #536 is the direct driver, filed same day

Issue #536 "Metrics: add request latency histograms and process metrics for monitoring parity with vLLM", by Napuh, opened 2026-11-26 09:03, updated same minute, open, 0 comments. Environment: hyperflare-inference v0.3.2 (c0c4f79).

Missing-vs-vLLM table it builds: e2e latency (vllm:e2e_request_latency_seconds), queue time, time_per_output_token / inter_token_latency, prefill duration, decode duration, TTFT (only flare_first_response_median_seconds 60 s median gauge today), prompt tokens per request (vllm:request_prompt_tokens), process metrics (process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, process_start_time_seconds).

Motivation stated: the median gauge cannot give P95/P99, cannot be computed over other windows, cannot be aggregated across instances; histograms let users run histogram_quantile() over any window and alert on tail latency.

It proposed exactly the names PR #548 implements: flare_request_e2e_seconds, flare_request_queue_seconds, flare_request_prefill_seconds, flare_request_decode_seconds, flare_time_per_output_token_seconds, flare_time_to_first_response_seconds, flare_request_prompt_tokens, plus process_*. It also proposed keeping flare_first_response_median_seconds for compatibility (PR #548 does).

Difference vs the proposal: #536 asked for flare_request_queue_seconds = "admission to first scheduled step"; PR #548 measures "model-scheduler arrival to first model step" (docs/api.md wording) — i.e. it starts at runtime arrival, not HTTP admission. Also #536 did not list process_virtual_memory_bytes (PR adds it) and PR #548 does not add vLLM's flare_... equivalent of inter-token latency beyond time_per_output_token.

Filed by Napuh, 0 comments, 0 interest shown beyond the filing; the same day two PRs (#548, #549) close it and #537, all by WynnD, and #541 (jere357) builds a Grafana dashboard that mentions #536.

#3 [high] Change: what the new histograms measure, verified in code

Verified in code (PR head ebecef1):

#4 [high] Change: e2e is server-side only; TTFR needs a client poll, e2e does not

#5 [high] Change: process metrics are hand-rolled procfs, Linux only, no new dependency

helios/src/server/metrics/process.rs is a hand-written clone of the Prometheus client collector, not an added dependency. libc = "0.2.189" is already an unconditional dependency of the flare-helios crate (helios/Cargo.toml:50), so no new crate and no feature gate; the module is pub(super) mod process; in metrics.rs and is only reached from the /metrics text handler (server.rs:709). No Cargo.toml change in the PR (file list confirms). This satisfies the charter's "pin everything / no new dependencies" preference — the alternative (adding the prometheus crate) would have been a dependency change.

Platform behavior: render() is a no-op outside Linux (#[cfg(not(target_os = "linux"))] let _ = text;). Windows is a supported serving target (docs/windows.md; flare-winui; the native-serving CI matrix builds and tests on windows-2022, .github/workflows/native-serving.yml:17-21,64-68), so a Windows operator scraping /metrics sees no process_* series and generic Prometheus process dashboards stay empty there. docs/api.md (PR) says "Other platforms omit them", so it is documented but the PR description's framing ("generic Prometheus process dashboards have no process_* series to read") is only resolved on Linux.

Robustness choices: each source read is .ok()-guarded and a parse failure omits only the dependent metric (no unwrap in the render path); sysconf(_SC_CLK_TCK)/_SC_PAGESIZE and getrlimit(RLIMIT_NOFILE) are wrapped in unsafe with SAFETY comments; parse_stat splits after the last ) to survive a command name containing ) and spaces, and there is a unit test for that (parse_stat_reads_fields_after_a_parenthesized_command_with_a_paren).

#6 [high] Related work: #536/#537/#541/#549 cluster and prior histogram code

All three come from the same request wave and are dated 2026-11-26:

#7 [high] Claims and evidence: what is backed, what is not, CI has not run

#8 [high] People: first-time contributor; the area is owned by yatesdr and Luke Alonso

#9 [high] Reach: docs inconsistencies introduced or fixed by the change

#10 [high] Project fit: charter clauses on evidence, scope and what gets merged

Charter (read_charter) facts, stated as facts:

#13 [high] Research summary

Case file for PR #548 "Add request latency histograms and process metrics" (WynnD, draft, +545/−20, 8 files, head ebecef1, no CI checks, no reviews) is gathered in the scratchpad across 12 entries, one per angle.

Key findings a reader could not get from the description:

  1. flare_request_queue_seconds starts at runtime arrival, not HTTP admission: Incoming.arrival_ns is set in ModelRuntime::schedule (runtime.rs:901) and handed to the scheduler at runtime.rs:1471. Issue #536 asked for "admission to first scheduled step"; e2e and TTFR, by contrast, start at HTTP admission (AdmittedAt, server.rs:828). The description names neither start point, so a reader porting vLLM queue-time semantics can mis-map it. Prompt-token observation uses the preemption-carried original prompt length, so it agrees with per-response usage.prompt_tokens.
  2. Undeclared asymmetry in the HTTP observations: flare_time_to_first_response_seconds is recorded only when the client actually polls the body, while flare_request_e2e_seconds is recorded as soon as the handler produces the completed response even if the body is dropped (http.rs:614-617 vs :607/638; phase_tests.rs:4406-4473 pins both behaviours). e2e therefore measures server-side handling, not delivery.
  3. helios/src/server/metrics/process.rs is hand-written procfs code, Linux only; libc is already an unconditional dependency of flare-helios (Cargo.toml:50), so no Cargo change. Windows is a supported serving target and CI builds it, but a Windows scrape gets no process_* series — documented, yet it means the description's generic-dashboard motivation is resolved only on Linux. process_open_fds counts its own directory read (declared in the help string).
  4. The docs hunk also silently repairs pre-existing drift: the old text claimed host-prefix lookups were "the only histograms" while flare_host_cache_retirement_seconds already shipped. Conversely the change leaves "Counter and gauge names start with flare_" (api.md:288-289) standing while adding unprefixed process_*.
  5. Process/community: the PR is a draft with zero checks, zero comments and no maintainer engagement anywhere in the cluster. The author has no merged contribution and GitHub association NONE; their other PR (#549) was opened the same day; both close issues (#536, #537) filed the same morning by one new filer, Napuh. So the demand is under a day old and one-requester wide — relevant to the charter's "explicit maintainer request" merger test.
  6. Evidence: the claimed test runs are two module subsets (server::runtime::phase_tests 109 passed; server::metrics:: 20 passed); Windows build, full helios suite and one template-dependent test are explicitly not run, and CI does cover the first two on both ubuntu and windows-2022 (native-serving.yml:56-68) but has not run. The live scrape is a single two-GPU DeepSeek instance whose deltas include the agent session's own traffic — self-declared confound, not a controlled three-request measurement. No performance claim is made and none of the added per-completion cost is measured.
  7. Related work: nothing on main conflicts (no default-branch commit since f377dc8 touches these files); metrics.rs has three open PRs in flight (#548, #549, #542) plus #334 touching it; #507 is the function the new code sits beside; #541 is the Grafana consumer whose own auto-review says the only in-repo Grafana signal is #536. The change leaves the four existing host-cache histograms on their older [AtomicU64; 8] implementation, so the file now holds two histogram implementations.
  8. Charter fit: observability-only, no per-model branch, complete four-part description — but the motivating framing ("monitoring parity with vLLM", migrating SLO alerts) sits against the charter's "not a general-purpose production server" self-description, and no maintainer has authorized the work.

Angles with nothing found: community (no comments, reviews or reactions anywhere in the cluster).

#11 [medium] Recent activity: nothing recent on main conflicts; metrics.rs has 3 open PRs

#14 [medium] Why (continued): #537 sibling gap, demand age, and the only pre-existing signals

#15 [medium] Process: draft with no CI on head; description meets the repo's four-part rule

#12 [low] Community: zero comments, reviews or reactions anywhere in the cluster

Community angle: nothing found beyond what is recorded elsewhere. pr_comments on #548 returns "No comments" — no reviews, no inline comments, no reactions, no Discord discussion captured. #536 and #537 each show "Discussion (0)". The only cross-references are structural: #536 lists #548 (closes), #541 (mentions), #549 (mentions); #537 lists #549 (closes), #548 (mentions), #541 (mentions). Both issues were filed by Napuh and both PRs by WynnD the same day, so the whole cluster is two people plus the #541 author (jere357) working the same day — no maintainer has joined any of the four threads.