Repository navigation
feat(cli,node): measure time to first byte by phase - #2294
Merged
Merged
Conversation
The node splits its serve time-to-first-byte into admission, response and first-frame phases, each a sibling histogram, with a debug event per serve. The delivery dashboard charts the phases. decdn fetch logs one `fetch timings` info event with the milliseconds to each mark: endpoint bound, probe start, holders resolved, signer unlocked, first lane ready, first byte. RUST_LOG=info shows it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit d944a56 in the Show a line coverage summary of the most impacted files.
|
alpergundogdu
deleted the
claude/ttfb-optimization-client-delays-18fdc0
branch
October 2, 2026 09:41
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Measures where time to first byte (TTFB) goes, on both ends of a paid fetch. No behaviour changes.
Node.
FirstByteClocksplits the existing serve TTFB into three sibling histograms. They record only for streams that write a first frame, so the phases sum to the existingdecdn_serve_first_byte_{hit,miss}_secondstotals.decdn_serve_admission_secondsgetPool/getAuthorizationreads on a cache missdecdn_serve_response_{hit,miss}_secondsStreamResponsewritten; origin probes or upstream setup on a missdecdn_serve_first_frame_{hit,miss}_secondsdebugevent,serve first byte, carries the three phases for each serve.adr/appendix-observability.mdand a "Serve time to first byte by phase" panel indashboard-delivery.json.Client.
decdn fetchlogs onefetch timingsinfo event (RUST_LOG=infoor-v). It gives milliseconds since start to each mark: endpoint bound, probe start, holders resolved, signer unlocked, first lane ready, first byte. It logs on success, failure and Ctrl-C.bundle pulldoes not log it.Baseline from the testnet
Test plan
cargo clippy --workspace --all-targets --all-featurescargo nextest run -p decdn-cli -p decdn-node: 2426 pass. One unrelated flaky test passed on retry.RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-itemscargo test --no-run -p decdn-e2e --features anvil-e2e🤖 Generated with Claude Code