Skip to content

Commit 6be2cc3

Browse files
branczclaude
andauthored
Add profiling filter preset for tokio frames (#6086)
* Add tokio filter preset to hide tokio runtime frames Adds a new profiling filter preset "Hide Tokio Frames" that filters out Tokio runtime frames from profiles using the starts_with filter. This helps users focus on application code by hiding frames starting with "tokio::" and "<tokio::". * Add Rust panic backtrace infrastructure filter preset Adds a new profiling filter preset "Hide Rust Panic Backtrace Infrastructure" that filters out Rust panic and backtrace infrastructure frames from profiles. This helps users focus on application code by hiding frames starting with "std::panic", "<core::panic", and "std::sys::backtrace". --------- Co-authored-by: Claude <[email protected]>
1 parent b86381e commit 6be2cc3

File tree

1 file changed

+44
-0
lines changed
  • ui/packages/shared/profile/src/ProfileView/components/ProfileFilters

1 file changed

+44
-0
lines changed

ui/packages/shared/profile/src/ProfileView/components/ProfileFilters/filterPresets.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,50 @@ export const filterPresets: FilterPreset[] = [
174174
},
175175
],
176176
},
177+
{
178+
key: 'hide_tokio_frames',
179+
name: 'Hide Tokio Frames',
180+
description: 'Excludes Tokio runtime frames from the profile',
181+
filters: [
182+
{
183+
type: 'frame',
184+
field: 'function_name',
185+
matchType: 'not_starts_with',
186+
value: 'tokio::',
187+
},
188+
{
189+
type: 'frame',
190+
field: 'function_name',
191+
matchType: 'not_starts_with',
192+
value: '<tokio::',
193+
},
194+
],
195+
},
196+
{
197+
key: 'hide_rust_panic_backtrace',
198+
name: 'Hide Rust Panic Backtrace Infrastructure',
199+
description: 'Excludes Rust panic and backtrace infrastructure frames from the profile',
200+
filters: [
201+
{
202+
type: 'frame',
203+
field: 'function_name',
204+
matchType: 'not_starts_with',
205+
value: 'std::panic',
206+
},
207+
{
208+
type: 'frame',
209+
field: 'function_name',
210+
matchType: 'not_starts_with',
211+
value: '<core::panic',
212+
},
213+
{
214+
type: 'frame',
215+
field: 'function_name',
216+
matchType: 'not_starts_with',
217+
value: 'std::sys::backtrace',
218+
},
219+
],
220+
},
177221
];
178222

179223
const presetKeys = new Set(filterPresets.map(preset => preset.key));

0 commit comments

Comments
 (0)