Skip to content

Commit

Permalink
ui: fix accidental split on colon in flamegraph filter
Browse files Browse the repository at this point in the history
string split did not work the way I thought it did.

Fixes: 391859336
Change-Id: Ie629f91e3788489c9357d04e99093c10f276e89b
  • Loading branch information
LalitMaganti committed Jan 23, 2025
1 parent 19dda8d commit 2ddbda7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/widgets/flamegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ function displayPercentage(size: number, totalSize: number): string {

function updateState(state: FlamegraphState, filter: string): FlamegraphState {
const lwr = filter.toLowerCase();
const splitFilterFn = (f: string) => f.split(':', 2)[1].trim();
const splitFilterFn = (f: string) => f.substring(f.indexOf(':') + 1).trim();
if (lwr.startsWith('ss:') || lwr.startsWith('show stack:')) {
return addFilter(state, {
kind: 'SHOW_STACK',
Expand Down

0 comments on commit 2ddbda7

Please sign in to comment.