profiler-cli: accept --limit 0 as unlimited, and make truncation loud - #6267
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| globalWithBuildConstants.__PACKAGE_NAME__ = 'profiler-cli'; | ||
| globalWithBuildConstants.__VERSION__ = '0.0.0-test'; | ||
|
|
||
| /* eslint-disable-next-line @typescript-eslint/no-var-requires */ |
There was a problem hiding this comment.
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.
| * Parse a `--limit`-style flag. Returns `undefined` for `0` and for an omitted | ||
| * value, which downstream consumers treat as "no limit". | ||
| */ | ||
| export function parseLimitArg( |
There was a problem hiding this comment.
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'; | ||
|
|
There was a problem hiding this comment.
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.
91eeb0f to
1711fac
Compare
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: 高乐喆
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.