Repository navigation
Move FileIO table labels into marker schemas - #6296
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6296 +/- ##
==========================================
+ Coverage 83.84% 83.88% +0.04%
==========================================
Files 352 353 +1
Lines 37807 37900 +93
Branches 10674 10691 +17
==========================================
+ Hits 31698 31793 +95
+ Misses 5679 5678 -1
+ Partials 430 429 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
canova
left a comment
There was a problem hiding this comment.
Thanks for the PR! Before I review completely, I see that this PR does 2 main things:
- Adds optional segment syntax to marker labels
- Adds a tableLabel to FileIO markers
It's difficult to review these two changes when they are combined together. Can you please split them into 2 commits?
Done ✅ |
canova
left a comment
There was a problem hiding this comment.
Re the optional segmenting in labels using ``[[ ... ]]`:
I'm a bit unsure about adding more and more label templating features to the marker labels. It feels like it can get out of hand quickly and not that easy to get it right.
Pinging and @mstange and @fqueze in case they feel strongly about it.
One issue that I can see is ternaries and the optional segment conflicts right now. For example [[{marker.data.canceled ? 'cancelled' : 'ok'}]] never prints ok if I understand correctly.
On the other hand, I believe this current behavior of FileIO marker can be implemented using ternaries already, right? I assume it'll be longer, but it saves us from adding more complexity here. What do you think?
Your example does print We cannot have the same behavior with just the ternaries though. The current hardcoded FileIO code omits that entire section when source is empty. Existing ternaries cannot conditionally include the interpolation itself. So, instead of having |
|
@canova Thanks for the review! I've addressed your other comments, however, I am not sure what to do with the increased vocabulary complexity... |
|
Thanks for thinking it through!
Yeah I wasn't fully correct on "never" prints I have two markers, with
You are right on that, but this sounds like a bug to me. We show For example I think this if check should include checking empty strings too: profiler/src/profile-logic/marker-schema.ts Lines 266 to 268 in f8a4b7a Once that's fixed the ternary version of this FileIO marker could be this: Not nice looking but good enough. |
Thanks for your response, @canova! That should indeed work. Implemented now. |
Marker labels pass empty strings to the shared value formatter, which renders them as `(empty)` for tooltip fields. Skip empty strings before formatting label parts so labels can omit them without changing tooltip formatting.
Replace the hardcoded `data.type` branch in the generic label fallback with a template on the FileIO schema.
|
Changes: [fatadel] Show a category breakdown in profiler-cli (#6256) [fatadel] Show allocation data in the cli (#6246) [Florian Quèze] profiler-cli: name the process in the thread banner, and follow the queried thread (#6269) [fatadel] Drive PII sanitization from marker schemas (#6291) [fatadel] Move FileIO table labels into marker schemas (#6296) [Florian Quèze] profiler-cli: add a thread list command (#6273) [Nazım Can Altınova] Update oxfmt 0.63.0 → 0.68.0 (major) (#6316) [Markus Stange] Add missing finishRawMarkerTableBuilder. (#6318) [Markus Stange] Fix the upload error button contrast (#6315) [Markus Stange] Allow typed arrays in the nativeSymbols table (#6300) [Markus Stange] Remove brittle test. (#6322) [Markus Stange] Fix file extension typo. (#6325) [Nazım Can Altınova] Add a permalink command to profiler-cli for already published profiles (#6331) [Markus Stange] Typed arrays + flags for the FuncTable (#6323) [Florian Quèze] profiler-cli: add profile markers for cross-thread marker search (#6276) [fatadel] Convert extension text markers to structured payloads (#6314) [Florian Quèze] profiler-cli: include per-marker fields and data in --list --json (#6275) [Nazım Can Altınova] Add `--with-samply` to "profiler-cli load" (#6339) [Markus Stange] Speed up call tree sidebar by sharing work with the activity graph (#6329) [Nazım Can Altınova] 🔃 Sync: l10n -> main (Sept 22, 2026) (#6341) [Nazım Can Altınova] Bump profiler-cli version to 0.10.0 (#6342) And special thanks to our localizers: el: Jim Spentzos ro: robbp
Main | Deploy preview
Replace the hardcoded
data.typebranch that assembles FileIO table labels with a schema template. Optional segments let the template omit surrounding punctuation when source or filename fields are missing.Closes #6295
Profile with IO enabled