Skip to content

profiler-cli: accept --limit 0 as unlimited, and make truncation loud - #6267

Merged
canova merged 1 commit into
firefox-devtools:mainfrom
fqueze:profiler-cli-limit-zero-pr
Aug 21, 2026
Merged

profiler-cli: accept --limit 0 as unlimited, and make truncation loud#6267
canova merged 1 commit into
firefox-devtools:mainfrom
fqueze:profiler-cli-limit-zero-pr

Conversation

@fqueze

@fqueze fqueze commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Main | Deploy preview

thread network documented --limit 0 as "all requests" while thread markers rejected it as "must be a positive integer". Accept 0 everywhere --limit is taken, and name the omitted count and the expanding flag whenever output is truncated.

thread samples/samples-top-down/samples-bottom-up declare --limit but never read it. Left as-is here: removing it is a behaviour change unrelated to accepting 0, and belongs in its own commit.

@fqueze
fqueze requested a review from canova August 18, 2026 11:11
@codecov

codecov Bot commented Aug 18, 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 (1711fac).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6267    +/-   ##
========================================
  Coverage   83.79%   83.79%            
========================================
  Files         350      350            
  Lines       37583    37583            
  Branches    10459    10559   +100     
========================================
  Hits        31492    31492            
  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.

globalWithBuildConstants.__PACKAGE_NAME__ = 'profiler-cli';
globalWithBuildConstants.__VERSION__ = '0.0.0-test';

/* eslint-disable-next-line @typescript-eslint/no-var-requires */

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.

The following line wasn't actually throwing a linter error, and the linter is failing due to this line :) Can you remove it please. And please make sure that the linter is passing.

Comment thread profiler-cli/src/commands/shared.ts Outdated
* Parse a `--limit`-style flag. Returns `undefined` for `0` and for an omitted
* value, which downstream consumers treat as "no limit".
*/
export function parseLimitArg(

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.

Can you please move this into profiler-cli/src/utils/parse.ts

globalWithBuildConstants.__BUILD_HASH__ = 'test-build-hash';
globalWithBuildConstants.__PACKAGE_NAME__ = 'profiler-cli';
globalWithBuildConstants.__VERSION__ = '0.0.0-test';

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.

Oh my.. This doesn't look like a nice setup. Once we move parseLimitArg inside profiler-cli/src/utils/parse.ts, we will be able to import it just like import { parseLimitArg } from '../../utils/parse'; instead of this whole hacky require('../../commands/shared') and globalWithBuildConstants.

thread network documented --limit 0 as "all requests" while thread markers
rejected it as "must be a positive integer". Accept 0 everywhere --limit is
taken, and name the omitted count and the expanding flag whenever output is
truncated.

thread samples/samples-top-down/samples-bottom-up declare --limit but never
read it. Left as-is here: removing it is a behaviour change unrelated to
accepting 0, and belongs in its own commit.
@fqueze
fqueze force-pushed the profiler-cli-limit-zero-pr branch from 91eeb0f to 1711fac Compare August 20, 2026 16:09
@fqueze
fqueze requested a review from canova August 20, 2026 16:10
@canova
canova merged commit df31314 into firefox-devtools:main Aug 21, 2026
23 checks passed
@fatadel fatadel 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 free to 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