Add "drop samples with category" transform#5943
Add "drop samples with category" transform#5943canova wants to merge 1 commit intofirefox-devtools:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5943 +/- ##
=======================================
Coverage 85.38% 85.39%
=======================================
Files 322 322
Lines 32101 32143 +42
Branches 8849 8860 +11
=======================================
+ Hits 27410 27448 +38
- Misses 4260 4263 +3
- Partials 431 432 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hmm, in the deploy preview, if I drop samples with category JavaScript, it also drops samples with category DOM where the stack contains a JS function. |
|
Oh, I'm currently removing all the samples if they contain the category anywhere in their stack. It makes more sense to drop them if that category is the leaf only. |
049e78d to
3d480ef
Compare
|
I guess I was following how |
3d480ef to
ccc3c7c
Compare
|
It's definitely more in line with my expectations. But now it's a bit confusing that you apply the filter by clicking a call node which will often still be there even with the filter applied. But maybe it's good enough. |
ccc3c7c to
b9dd201
Compare
|
Yeah, I think it's a reasonable until we have something better. |
b9dd201 to
0ef4f32
Compare
This is useful for cases where I want to drop all the "idle" category samples, so I can focus on non-idle samples. Or it can be useful for dropping the whole profiler overhead by removing the "profiler" category. I would like to use this transform in the pq cli tool, so we can remove the idle category before finding the "top functions". Otherwise the idle category just pollutes the output of the cli a lot.
0ef4f32 to
5ab25fb
Compare
| # This is used as the context menu item to apply the "Drop category" transform. | ||
| # Variables: | ||
| # $categoryName (String) - Name of the category to drop. | ||
| CallNodeContextMenu--transform-drop-category = Drop samples with category <strong>{ $categoryName }</strong> |
There was a problem hiding this comment.
Is there a reason to use "Drop", vs something like "Ignore" or "Remove"?
There was a problem hiding this comment.
We already have other "Drop ... " transforms, and I wanted to keep it consistent with the others. For example, we have two other transforms called: Drop samples with this function and Drop samples outside of markers matching .... So it was a natural choice to use drop here too.
Also, I think "remove" could be a bit ambiguous because several other transforms remove things. For example, we have "collapse" and "merge". That's another reason I preferred "drop".
| # This is used as the context menu item to apply the "Drop category" transform. | ||
| # Variables: | ||
| # $categoryName (String) - Name of the category to drop. | ||
| CallNodeContextMenu--transform-drop-category = Drop samples with category <strong>{ $categoryName }</strong> |
| # $item (String) - Name of the category that transform applied to. | ||
| TransformNavigator--focus-category = Focus category: { $item } | ||
|
|
||
| # "Drop samples with category" transform. |
There was a problem hiding this comment.
| # "Drop samples with category" transform. | |
| # "Drop samples with category" transform (drop is a verb, as in remove) |
This is useful for cases where I want to drop all the "idle" category samples, so I can focus on non-idle samples. Or it can be useful for dropping the whole profiler overhead by removing the "profiler" category.
I would like to use this transform in the pq cli tool, so we can remove the idle category before finding the "top functions". Otherwise the idle category just pollutes the output of the cli a lot.
Example profile: deploy preview
Use the drop samples with category transform on the idle category above.