Uh oh!
There was an error while loading. Please reload this page.
Surface network activity across profiler-cli - #6175
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #6175 +/- ##
==========================================
+ Coverage 83.49% 83.62% +0.13%
==========================================
Files 344 345 +1 Lines 36868 37051 +183 Branches 10343 10270 -73 ==========================================
+ Hits 30782 30983 +201 + Misses 5659 5640 -19 - Partials 427 428 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| - CPU time is not the only signal. A profile where threads are mostly idle but | ||
| network is in flight for most of the duration is a network-bound profile -- | ||
| report the slow requests, not the hottest function. |
There was a problem hiding this comment.
neat - very specific but probably useful
There was a problem hiding this comment.
Yeah, I wanted to make this explicit because it was still ignoring the network some times when I was testing with some profiles. This improved that.
Introduce src/profile-query/network-summary.ts with the small, UI-independent building blocks used by every network consumer: interval union (wall-clock in-flight time), peak concurrency, the long-lived (long duration, tiny transfer) heuristic, and cache classification. These are pure functions with no profile dependencies; the callers land in the following commits.
The summary now leads with the interval-union in-flight wall-clock time and peak concurrency, computed over all requests intersecting the range. The phase totals are relabeled "summed across concurrent requests" so they no longer read as wall-clock time (they previously showed e.g. "Download: 24m3s" for a 2m28s profile).
Requests still in flight when the recording stopped are now included in
the request list and counted separately ("N request(s) did not complete
during the recording"). Their duration is measured until the end of the
recording, and durations are clamped to the current range so a request
that started before the range does not report more time than the profile
covers.Requests are now sorted by in-range duration descending by default, with --sort start to get chronological order back. A limited window (the default 20 rows) previously showed the first 20 requests chronologically; agents need the slowest ones. The order is reflected in the header and exposed as an explicit `sort` field in JSON.
Add a network-activity summary to the two entry-point commands so wall-clock waiting is as visible as CPU usage. The headline metric is the interval-union time in flight, plus peak concurrency, in-flight-at- end counts, and the slowest requests carrying marker handles for drill-down. Profile-wide numbers are deduped across processes since the parent process copies every request. The section renders after CPU activity in both commands. Extends network-summary.ts with the per-thread and profile-wide computation on top of the shared helpers, and updates the guide, JSON schemas, and README so the agent-facing prompt teaches the new signals (CPU-bound vs wait-bound, the in-flight metric, marker handles, the long-lived streaming/long-poll annotation, and the --sort flag).
…summaries Route `collectThreadNetwork` through the `gatherNetworkRecords` / `clampInterval` / `clampedDurationMs` helpers that `profile info` and `thread info` already use, and export them from network-summary.ts. This drops the command's own inline copy of the gather / clamp / count / cache logic, so there is a single source of truth for "what are this thread's network requests."
canova
commented
Jul 15, 2026
Thanks for the review! Btw I just removed the commit that adds |
Uh oh!
There was an error while loading. Please reload this page.
Changes: [Sky Ning] Skip preview links for non-main PRs (#6161) [spokodev] fix(gecko-upgrade): don't crash on a counter with empty sample_groups (#6160) [fatadel] Show counter values over time in profiler-cli (#6136) [Markus Stange] Make profile-conversion snapshots more compact and meaningful (#6152) [Markus Stange] More typed arrays: sample + counter times, some frametable columns (#6139) [Nazım Can Altınova] Only render a marker url field as a link when the whole value is a URL (#6163) [fatadel] Show each counter's owning process in profiler-cli (#6164) [Nazım Can Altınova] Document the pre-existing thread info and network JSON schemas in the cli (#6171) [Markus Stange] Copy column contents in getRawSamplesTableBuilderFromExisting for consistency (#6168) [Markus Stange] Convert eligible columns to typed arrays when outputting from profiler-edit (#6167) [Markus Stange] Remove unused samples.thread column (#6151) [Markus Stange] Fixed botched merge which broke 'yarn ts' (#6174) [Nazım Can Altınova] Add marker handles to `profiler-cli thread network` (#6172) [Markus Stange] Update json-slabs 0.3.0 → 0.4.0 (major) (#6176) [Nazım Can Altınova] Surface network activity across profiler-cli (#6175) [Nazım Can Altınova] Add `profile meta` command to profiler-cli (#6177) [Markus Stange] Allow raw marker table's `startTime` and `endTime` columns to be Float64Array (#6169) [nightcityblade] Fix light theme text selection colors (#6186) [Nazım Can Altınova] Import source map URLs from Chrome DevTools traces (#6190) [Nazım Can Altınova] Rename yarn `build-profiler-cli` script to `build-cli` (#6191) [Nazım Can Altınova] Migrate husky to version 9 (#6201) [Nazım Can Altınova] Fix horizontal overflow when the transform navigator is long (#6199) [fatadel] Add a 'hexadecimal' marker schema field format (#6197) [Nazım Can Altınova] Bump source-map to 0.8.0 and remove the old type workaround (#6202) [Nazım Can Altınova] 🔃 Sync: l10n -> main (July 21, 2026) (#6209) And special thanks to our localizers: fr: parmegiani.thomas fr: Théo Chevalier sr: Марко Костић (Marko Kostić) sv-SE: Luna Jernberg tr: Grk zh-CN: Ariel zh-CN: Olvcpr423
Main | Deploy preview
Fixes#6108.
Note that this depends on #6172, so please review that one first. The first commit is that PR, so please ignore it when reviewing this PR as well. I'll rebase this PR once that lands.
This PR adds network information to
pq profile infoandpq thread info. This also fixes a bunch of things things in thepq thread network, but they are all dependent on each other so it's very difficult to split.Example profile https://share.firefox.dev/4aGPacn
Profile info and thread info looks like this: