Skip to content

profiler-cli: report the network request count the filters ran against - #6274

Merged
canova merged 2 commits into
firefox-devtools:mainfrom
fqueze:profiler-cli-network-request-count
Aug 24, 2026
Merged

profiler-cli: report the network request count the filters ran against#6274
canova merged 2 commits into
firefox-devtools:mainfrom
fqueze:profiler-cli-network-request-count

Conversation

@fqueze

@fquezefqueze commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Main | Deploy preview

thread network --limit 0 printed "114 requests ... (filtered from 104)" -- a pre-filter total below the count it qualified. totalRequestCount counts only completed legs and incompleteCount only in-flight ones, so redirect and cancel legs are counted by neither and the sum of the two is not the set the filters ran against. Add totalCandidateCount and use it for that total.

profile info's "By thread:" row has the same undercount and said only "reqs", so it printed 104 where thread network printed 114 for the same thread; it now says "completed reqs".

@fqueze
fqueze requested a review from canovaAugust 20, 2026 14:22
@codecov

codecovBot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.79%. Comparing base (9203f11) to head (d37706b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #6274 +/- ##
=======================================
Coverage 83.79% 83.79% =======================================
Files 350 350 Lines 37583 37584 +1 Branches 10459 10459 =======================================
+ Hits 31492 31493 +1 
Misses 5664 5664 Partials 427 427 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fqueze
fquezeforce-pushed the profiler-cli-network-request-count branch from be9ae73 to 2d21320CompareAugust 20, 2026 19:41

@canovacanova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add totalCandidateCount to schemas.txt

Comment threadprofiler-cli/src/formatters.ts Outdated
const parts = summary.byThread.map(
(thread) =>
`${thread.threadHandle} ${thread.threadName} (${thread.requestCount} reqs, ${formatDuration(thread.inFlightMs)} in flight)`
`${thread.threadHandle} ${thread.threadName} (${thread.requestCount} completed reqs, ${formatDuration(thread.inFlightMs)} in flight)`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed reqs is incorrect. It includes both completed and in-flight requests. See:

constthreadRequestCount=records.filter(
(record)=>isCompleted(record)||record.incomplete
).length;

`thread network --limit 0` printed "114 requests ... (filtered from 104)" -- a
pre-filter total below the count it qualified. totalRequestCount counts only
completed legs and incompleteCount only in-flight ones, so redirect and cancel
legs are counted by neither and the sum of the two is not the set the filters
ran against. Add totalCandidateCount and use it for that total.
`profile info`'s "By thread:" row has the same undercount and said only "reqs",
so it printed 104 where `thread network` printed 114 for the same thread; it now
says "started reqs", which covers the completed and in-flight legs that count
includes.
@fqueze
fquezeforce-pushed the profiler-cli-network-request-count branch from 2d21320 to 4655e96CompareAugust 21, 2026 15:59
@fqueze
fqueze requested a review from canovaAugust 21, 2026 15:59
@canova
canova enabled auto-merge (squash) August 24, 2026 13:46
@canova
canova merged commit 846636c into firefox-devtools:mainAug 24, 2026
21 checks passed
@fatadelfatadel mentioned this pull request Sep 3, 2026
fatadel added a commit that referenced this pull request Sep 3, 2026
Changes:
[Nazım Can Altınova] Update oxfmt 0.59.0 → 0.63.0 (major) (#6262)
[Andrew Creskey] Show which network requests were prefetched (#6259)
[Florian Quèze] profiler-cli: document the marker field:value search
syntax (#6265)
[Florian Quèze] profiler-cli: report one time base for text and JSON
output (#6266)
[Florian Quèze] profiler-cli: avoid a stack overflow on large marker
threads (#6264)
[Markus Stange] Give the frameTable a lib column (#6258)
[Florian Quèze] profiler-cli: accept --limit 0 as unlimited, and make
truncation loud (#6267)
[Florian Quèze] profiler-cli: report the network request count the
filters ran against (#6274)
[Nazım Can Altınova] Fix dark mode contrast of the warning icons in the
publish panel (#6280)
[Nazım Can Altınova] Extract the publish panel warning indicator into a
small component (#6282)
[Markus Stange] More typed arrays in the FrameTable (and a flags column)
(#6173)
[Nazım Can Altınova] Improve the profiler-cli publish script and
document the whole deployment in a better way (#6260)
[fatadel] 🔃 Sync: l10n -> main (September 3, 2026) (#6301)
[fatadel] Bump profiler-cli version to 0.9.0 (#6302)
And special thanks to our localizers:
es-CL: ravmn
nl: Mark Heijl
sv-SE: Andreas Pettersson
sv-SE: Luna Jernberg
sv-SE: Peter Kihlstedt
tr: Selim Şumlu
tr: giray
zh-CN: 高乐喆
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fqueze@canova