profiler
profiler copied to clipboard
Add initially selected/visible threads and ordering setting
The default selection of initially visible and selected threads is highly specific to the web use case, but rarely usable for imported profiles. The same is for the ordering, as the writer of the imported profile should have control over this too. This PR therefore introduces three new settings in the meta
section of the profile format:
// Indexes of the threads that are initially visible in the UI.
// This is useful for imported profiles for which the internal visibility score
// ranking does not make sense.
initialVisibleThreads?: ThreadIndex[],
// Indexes of the threads that are initially selected in the UI.
// This is also most useful for imported profiles where just using the first thread
// of each process might not make sense.
initialSelectedThreads?: ThreadIndex[],
// Keep the defined thread order
disableThreadOrdering?: boolean,
This simple PR also includes tests (most of the lines of code) to check for the default and the new behavior.
Codecov Report
Base: 88.44% // Head: 88.45% // Increases project coverage by +0.00%
:tada:
Coverage data is based on head (
1f942b1
) compared to base (7b3a30c
). Patch coverage: 100.00% of modified lines in pull request are covered.
:exclamation: Current head 1f942b1 differs from pull request most recent head 84459ef. Consider uploading reports for the commit 84459ef to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #4263 +/- ##
=======================================
Coverage 88.44% 88.45%
=======================================
Files 282 282
Lines 24857 24870 +13
Branches 6660 6666 +6
=======================================
+ Hits 21985 21998 +13
Misses 2667 2667
Partials 205 205
Impacted Files | Coverage Δ | |
---|---|---|
src/profile-logic/tracks.js | 83.85% <100.00%> (+0.39%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Have you tried specifying these directly in the URL?
No, I thought that a converter should not rely on the URL to preselect threads.
Any thoughts @julienw ?
I resolved the small issues you mentioned. The whole idea of this PR is to allow the profile writer to specify that the order of thread tracks is the order of the threads in the profile file. This does not need a special field that specifies the order and is therefore the simplest solution for this problem (and the most obvious for the profile writer, as the current ordering is not really expected).
I think the more complex option is better left for future discussions, especially as we would need to decide on which the current semantics really is. Is it really just startTime
?
I renamed the flag, so it should be ready?
I think the more complex option is better left for future discussions, especially as we would need to decide on which the current semantics really is. Is it really just
startTime
?
yeah I think startTime
is the previous behavior and what some folks want. But I'm fine with keeping this to a future discussion.