@parca/profile 0.19.20 → 0.19.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  3. package/dist/ProfileExplorer/ProfileExplorerCompare.js +1 -3
  4. package/dist/ProfileExplorer/index.d.ts.map +1 -1
  5. package/dist/ProfileExplorer/index.js +5 -8
  6. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
  7. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +0 -2
  8. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts +0 -1
  9. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts.map +1 -1
  10. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +2 -11
  11. package/dist/ProfileFlameGraph/FlameGraphArrow/index.d.ts.map +1 -1
  12. package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +6 -14
  13. package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
  14. package/dist/ProfileSelector/useAutoQuerySelector.js +1 -1
  15. package/dist/ProfileSource.d.ts +4 -11
  16. package/dist/ProfileSource.d.ts.map +1 -1
  17. package/dist/ProfileSource.js +6 -14
  18. package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
  19. package/dist/ProfileView/components/ColorStackLegend.js +14 -10
  20. package/dist/ProfileView/components/DashboardItems/index.d.ts +1 -3
  21. package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
  22. package/dist/ProfileView/components/DashboardItems/index.js +2 -2
  23. package/dist/ProfileView/components/GroupByLabelsDropdown/index.d.ts.map +1 -1
  24. package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +14 -1
  25. package/dist/ProfileView/components/InvertCallStack/index.js +1 -1
  26. package/dist/ProfileView/components/ProfileFilters/index.d.ts +5 -0
  27. package/dist/ProfileView/components/ProfileFilters/index.d.ts.map +1 -0
  28. package/dist/ProfileView/components/ProfileFilters/index.js +173 -0
  29. package/dist/ProfileView/components/ProfileFilters/useProfileFilters.d.ts +17 -0
  30. package/dist/ProfileView/components/ProfileFilters/useProfileFilters.d.ts.map +1 -0
  31. package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +209 -0
  32. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +8 -0
  33. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -0
  34. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +87 -0
  35. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
  36. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +3 -10
  37. package/dist/ProfileView/components/Toolbars/index.d.ts +0 -5
  38. package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
  39. package/dist/ProfileView/components/Toolbars/index.js +6 -6
  40. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
  41. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +3 -12
  42. package/dist/ProfileView/hooks/useVisualizationState.d.ts +0 -3
  43. package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
  44. package/dist/ProfileView/hooks/useVisualizationState.js +0 -7
  45. package/dist/ProfileView/index.d.ts.map +1 -1
  46. package/dist/ProfileView/index.js +3 -5
  47. package/dist/ProfileViewWithData.d.ts.map +1 -1
  48. package/dist/ProfileViewWithData.js +8 -7
  49. package/dist/Sandwich/index.d.ts.map +1 -1
  50. package/dist/Sandwich/index.js +4 -2
  51. package/dist/Table/index.d.ts +0 -2
  52. package/dist/Table/index.d.ts.map +1 -1
  53. package/dist/Table/index.js +5 -32
  54. package/dist/styles.css +1 -1
  55. package/dist/useQuery.d.ts +1 -1
  56. package/dist/useQuery.d.ts.map +1 -1
  57. package/dist/useQuery.js +7 -40
  58. package/package.json +7 -7
  59. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +0 -4
  60. package/src/ProfileExplorer/index.tsx +4 -13
  61. package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +0 -2
  62. package/src/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.tsx +1 -14
  63. package/src/ProfileFlameGraph/FlameGraphArrow/index.tsx +4 -16
  64. package/src/ProfileSelector/useAutoQuerySelector.ts +1 -2
  65. package/src/ProfileSource.tsx +6 -49
  66. package/src/ProfileView/components/ColorStackLegend.tsx +16 -12
  67. package/src/ProfileView/components/DashboardItems/index.tsx +0 -6
  68. package/src/ProfileView/components/GroupByLabelsDropdown/index.tsx +15 -2
  69. package/src/ProfileView/components/InvertCallStack/index.tsx +1 -1
  70. package/src/ProfileView/components/ProfileFilters/index.tsx +294 -0
  71. package/src/ProfileView/components/ProfileFilters/useProfileFilters.ts +284 -0
  72. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +103 -0
  73. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +3 -16
  74. package/src/ProfileView/components/Toolbars/index.tsx +5 -35
  75. package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +5 -12
  76. package/src/ProfileView/hooks/useVisualizationState.ts +0 -11
  77. package/src/ProfileView/index.tsx +1 -15
  78. package/src/ProfileViewWithData.tsx +9 -9
  79. package/src/Sandwich/index.tsx +5 -2
  80. package/src/Table/index.tsx +3 -44
  81. package/src/useQuery.tsx +11 -43
  82. package/dist/ProfileView/components/FilterByFunctionButton.d.ts +0 -3
  83. package/dist/ProfileView/components/FilterByFunctionButton.d.ts.map +0 -1
  84. package/dist/ProfileView/components/FilterByFunctionButton.js +0 -89
  85. package/src/ProfileView/components/FilterByFunctionButton.tsx +0 -128
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.19.21](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.20...@parca/profile@0.19.21) (2025-07-16)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.19.20](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.19...@parca/profile@0.19.20) (2025-07-11)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileExplorerCompare.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerCompare.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AAC5E,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,WAAW,EAAE,kBAAkB,CAAC;IAEhC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,sBAAsB,GAAI,4IAY7B,2BAA2B,KAAG,GAAG,CAAC,OA6EpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ProfileExplorerCompare.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerCompare.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AAC5E,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,WAAW,EAAE,kBAAkB,CAAC;IAEhC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,sBAAsB,GAAI,4IAY7B,2BAA2B,KAAG,GAAG,CAAC,OAyEpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -25,8 +25,6 @@ const ProfileExplorerCompare = ({ queryClient, queryA, queryB, profileA, profile
25
25
  closeProfile('B');
26
26
  };
27
27
  const [compareAbsolute] = useURLState('compare_absolute');
28
- const [functionFilter] = useURLState('filter_by_function');
29
- const [excludeFunction] = useURLState('exclude_function');
30
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2 relative mb-2", children: [_jsx("div", { className: "flex-column flex-1 p-2 shadow-md rounded-md", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, navigateTo: navigateTo, suffix: "_a", showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setShowMetricsGraph }) }), _jsx("div", { className: "flex-column flex-1 p-2 shadow-md rounded-md", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, navigateTo: navigateTo, suffix: "_b", showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setShowMetricsGraph }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx("div", { children: _jsx(ProfileViewWithData, { queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource(), Array.isArray(functionFilter) ? functionFilter[0] : functionFilter, excludeFunction === 'true', compareAbsolute === 'true') }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
28
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2 relative mb-2", children: [_jsx("div", { className: "flex-column flex-1 p-2 shadow-md rounded-md", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, navigateTo: navigateTo, suffix: "_a", showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setShowMetricsGraph }) }), _jsx("div", { className: "flex-column flex-1 p-2 shadow-md rounded-md", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, navigateTo: navigateTo, suffix: "_b", showMetricsGraph: showMetricsGraph, setDisplayHideMetricsGraphButton: setShowMetricsGraph }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx("div", { children: _jsx(ProfileViewWithData, { queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource(), compareAbsolute === 'true') }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
31
29
  };
32
30
  export default ProfileExplorerCompare;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAU1B,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAiBF,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAiB5E,CAAC;AA+UF,QAAA,MAAM,eAAe,GAAI,2CAItB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAU1B,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAiBF,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAiB5E,CAAC;AAsUF,QAAA,MAAM,eAAe,GAAI,2CAItB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -84,7 +84,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
84
84
  }
85
85
  }, [profileTypesError, onError]);
86
86
  /* eslint-disable @typescript-eslint/naming-convention */
87
- let { from_a, to_a, merge_from_a, merge_to_a, time_selection_a, compare_a, sum_by_a, from_b, to_b, merge_from_b, merge_to_b, time_selection_b, compare_b, sum_by_b, filter_by_function, exclude_function, } = queryParams;
87
+ let { from_a, to_a, merge_from_a, merge_to_a, time_selection_a, compare_a, sum_by_a, from_b, to_b, merge_from_b, merge_to_b, time_selection_b, compare_b, sum_by_b, } = queryParams;
88
88
  // eslint-disable-next-line @typescript-eslint/naming-convention
89
89
  const expression_a = getExpressionAsAString(queryParams.expression_a);
90
90
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -103,17 +103,17 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
103
103
  useEffect(() => {
104
104
  const mergeFrom = merge_from_a ?? undefined;
105
105
  const mergeTo = merge_to_a ?? undefined;
106
- const profileA = ProfileSelectionFromParams(mergeFrom, mergeTo, selection_a, filter_by_function, exclude_function === 'true');
106
+ const profileA = ProfileSelectionFromParams(mergeFrom, mergeTo, selection_a);
107
107
  setProfileA(profileA);
108
108
  // eslint-disable-next-line react-hooks/exhaustive-deps
109
- }, [merge_from_a, merge_to_a, selection_a, filter_by_function, exclude_function]);
109
+ }, [merge_from_a, merge_to_a, selection_a]);
110
110
  useEffect(() => {
111
111
  const mergeFrom = merge_from_b ?? undefined;
112
112
  const mergeTo = merge_to_b ?? undefined;
113
- const profileB = ProfileSelectionFromParams(mergeFrom, mergeTo, selection_b, filter_by_function, exclude_function === 'true');
113
+ const profileB = ProfileSelectionFromParams(mergeFrom, mergeTo, selection_b);
114
114
  setProfileB(profileB);
115
115
  // eslint-disable-next-line react-hooks/exhaustive-deps
116
- }, [merge_from_b, merge_to_b, selection_b, filter_by_function, exclude_function]);
116
+ }, [merge_from_b, merge_to_b, selection_b]);
117
117
  if (profileTypesLoading) {
118
118
  return _jsx(_Fragment, { children: loader });
119
119
  }
@@ -226,7 +226,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
226
226
  to_a: q.to.toString(),
227
227
  time_selection_a: q.timeSelection,
228
228
  sum_by_a: sumByToParam(q.sumBy),
229
- filter_by_function: filter_by_function ?? '',
230
229
  ...mergeParams,
231
230
  },
232
231
  }));
@@ -253,7 +252,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
253
252
  to_b: q.to.toString(),
254
253
  time_selection_b: q.timeSelection,
255
254
  sum_by_b: sumByToParam(q.sumBy),
256
- filter_by_function: filter_by_function ?? '',
257
255
  ...mergeParams,
258
256
  },
259
257
  }));
@@ -268,7 +266,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
268
266
  ...{
269
267
  compare_a: 'false',
270
268
  compare_b: 'false',
271
- search_string: '',
272
269
  },
273
270
  });
274
271
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAA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AAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,kIAalB,gBAAgB,KAAG,GAAG,CAAC,OAiOzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -35,7 +35,6 @@ const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, compareAbsolu
35
35
  compareAbsolute,
36
36
  });
37
37
  const { functionFilename, functionSystemName, file, openFile, isSourceAvailable, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row });
38
- const [_, setSearchString] = useURLState('search_string');
39
38
  const [dashboardItems, setDashboardItems] = useURLState('dashboard_items', {
40
39
  alwaysReturnArray: true,
41
40
  });
@@ -87,7 +86,6 @@ const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, compareAbsolu
87
86
  return (_jsxs(Menu, { id: menuId, theme: isDarkMode ? 'dark' : '', className: cx(dashboardItems.includes('sandwich')
88
87
  ? 'min-w-[350px] w-[350px]'
89
88
  : 'min-w-[260px] w-fit-content'), children: [_jsxs(Item, { id: "view-source-file", onClick: handleViewSourceFile, disabled: enableSourcesView === false || !isSourceAvailable, children: [_jsx("div", { "data-tooltip-id": "view-source-file-help", "data-tooltip-content": "There is no source code uploaded for this build", children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "wpf:view-file" }), _jsx("div", { children: "View source file" })] }) }), !isSourceAvailable ? _jsx(Tooltip, { id: "view-source-file-help" }) : null] }), _jsx(Item, { id: "show-in-table", onClick: () => {
90
- setSearchString(functionName);
91
89
  if (isSandwich) {
92
90
  setDashboardItems(['table']);
93
91
  }
@@ -13,7 +13,6 @@ export interface FlameNodeProps {
13
13
  row: number;
14
14
  colors: colorByColors;
15
15
  colorBy: string;
16
- searchString?: string;
17
16
  darkMode: boolean;
18
17
  compareMode: boolean;
19
18
  onContextMenu: (e: React.MouseEvent, row: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file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,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,eAAe;;;CAG3B,CAAC;AACF,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF,eAAO,MAAM,SAAS,4CAgNpB,CAAC"}
@@ -14,7 +14,6 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
14
14
  import React, { useMemo } from 'react';
15
15
  import cx from 'classnames';
16
16
  import { selectBinaries, useAppSelector } from '@parca/store';
17
- import { isSearchMatch } from '@parca/utilities';
18
17
  import 'react-contexify/dist/ReactContexify.css';
19
18
  import TextWithEllipsis from './TextWithEllipsis';
20
19
  import { FIELD_CUMULATIVE, FIELD_DEPTH, FIELD_DIFF, FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_NAME, FIELD_MAPPING_FILE, FIELD_TIMESTAMP, FIELD_VALUE_OFFSET, } from './index';
@@ -30,7 +29,7 @@ export const fadedFlameRectStyles = {
30
29
  transition: 'opacity .15s linear',
31
30
  opacity: '0.5',
32
31
  };
33
- export const FlameNode = React.memo(function FlameNodeNoMemo({ table, row, colors, colorBy, height, totalWidth, searchString, darkMode, compareMode, colorForSimilarNodes, selectedRow, onClick, onContextMenu, hoveringRow, setHoveringRow, isFlameChart, profileSource, isRenderedAsFlamegraph = false, isInSandwichView = false, maxDepth = 0, effectiveDepth, tooltipId = 'default', }) {
32
+ export const FlameNode = React.memo(function FlameNodeNoMemo({ table, row, colors, colorBy, height, totalWidth, darkMode, compareMode, colorForSimilarNodes, selectedRow, onClick, onContextMenu, hoveringRow, setHoveringRow, isFlameChart, profileSource, isRenderedAsFlamegraph = false, isInSandwichView = false, maxDepth = 0, effectiveDepth, tooltipId = 'default', }) {
34
33
  // get the columns to read from
35
34
  const mappingColumn = table.getChild(FIELD_MAPPING_FILE);
36
35
  const functionNameColumn = table.getChild(FIELD_FUNCTION_NAME);
@@ -66,12 +65,6 @@ export const FlameNode = React.memo(function FlameNodeNoMemo({ table, row, color
66
65
  const name = useMemo(() => {
67
66
  return row === 0 ? 'root' : nodeLabel(table, row, binaries.length > 1);
68
67
  }, [table, row, binaries]);
69
- const { isHighlightEnabled = false, isHighlighted = false } = useMemo(() => {
70
- if (searchString === undefined || searchString === '') {
71
- return { isHighlightEnabled: false };
72
- }
73
- return { isHighlightEnabled: true, isHighlighted: isSearchMatch(searchString, name) };
74
- }, [searchString, name]);
75
68
  // Hide frames beyond effective depth limit
76
69
  if (effectiveDepth !== undefined && depth > effectiveDepth) {
77
70
  return _jsx(_Fragment, {});
@@ -137,7 +130,5 @@ export const FlameNode = React.memo(function FlameNodeNoMemo({ table, row, color
137
130
  fill: colorResult,
138
131
  }, className: cx(shouldBeHighlighted
139
132
  ? `${colorForSimilarNodes} stroke-[3] [stroke-dasharray:6,4] [stroke-linecap:round] [stroke-linejoin:round] h-6`
140
- : 'stroke-white dark:stroke-gray-700', {
141
- 'opacity-50': isHighlightEnabled && !isHighlighted,
142
- }) }), width > 5 && (_jsx("svg", { width: width - 5, height: height, children: _jsx(TextWithEllipsis, { text: name, x: 5, y: 15, width: width - 10 }) }))] }) }));
133
+ : 'stroke-white dark:stroke-gray-700') }), width > 5 && (_jsx("svg", { width: width - 5, height: height, children: _jsx(TextWithEllipsis, { text: name, x: 5, y: 15, width: width - 10 }) }))] }) }));
143
134
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAQN,MAAM,OAAO,CAAC;AAKf,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAc,KAAK,WAAW,EAAC,MAAM,kBA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B,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,GAC3B,cAAc,MAAM,EAAE,EACtB,YAAY,OAAO,EACnB,qBAAqB,WAAW,KAC/B,aAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,eAAe,MAAM,EAAE,EACvB,YAAY,OAAO,EACnB,qBAAqB,WAAW,KAC/B,aAQF,CAAC;AAeF,eAAO,MAAM,eAAe,kDA+Q1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -18,6 +18,7 @@ import { useParcaContext, useURLState } from '@parca/components';
18
18
  import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
19
19
  import { getColorForFeature, selectDarkMode, useAppSelector } from '@parca/store';
20
20
  import { getLastItem } from '@parca/utilities';
21
+ import { useProfileFilters } from '../../ProfileView/components/ProfileFilters/useProfileFilters';
21
22
  import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
22
23
  import ContextMenuWrapper from './ContextMenuWrapper';
23
24
  import { FlameNode, RowHeight } from './FlameGraphNodes';
@@ -74,7 +75,7 @@ function getMaxDepth(depthColumn) {
74
75
  }
75
76
  return max;
76
77
  }
77
- export const FlameGraphArrow = memo(function FlameGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, profileSource, mappingsListFromMetadata, compareAbsolute, isFlameChart = false, isRenderedAsFlamegraph = false, isInSandwichView = false, tooltipId = 'default', maxFrameCount, isExpanded = false, }) {
78
+ export const FlameGraphArrow = memo(function FlameGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, profileSource, compareAbsolute, isFlameChart = false, isRenderedAsFlamegraph = false, isInSandwichView = false, tooltipId = 'default', maxFrameCount, isExpanded = false, }) {
78
79
  const [highlightSimilarStacksPreference] = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key);
79
80
  const [hoveringRow, setHoveringRow] = useState(undefined);
80
81
  const [dockedMetainfo] = useUserPreference(USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key);
@@ -110,8 +111,7 @@ export const FlameGraphArrow = memo(function FlameGraphArrow({ arrow, total, fil
110
111
  useEffect(() => {
111
112
  setSvgElement(svg.current);
112
113
  }, [tooltipId]);
113
- const [binaryFrameFilter, setBinaryFrameFilter] = useURLState('binary_frame_filter');
114
- const [currentSearchString] = useURLState('search_string');
114
+ const { excludeBinary } = useProfileFilters();
115
115
  const { compareMode } = useProfileViewContext();
116
116
  const currentColorProfile = useCurrentColorProfile();
117
117
  const colorForSimilarNodes = currentColorProfile.colorForSimilarNodes;
@@ -173,16 +173,8 @@ export const FlameGraphArrow = memo(function FlameGraphArrow({ arrow, total, fil
173
173
  });
174
174
  }, [show]);
175
175
  const hideBinary = (binaryToRemove) => {
176
- // second/subsequent time filtering out a binary i.e. a binary has already been hidden
177
- // and we want to hide more binaries, we simply remove the binary from the binaryFrameFilter array in the URL.
178
- if (Array.isArray(binaryFrameFilter) && binaryFrameFilter.length > 0) {
179
- const newMappingsList = binaryFrameFilter.filter(mapping => mapping !== binaryToRemove);
180
- setBinaryFrameFilter(newMappingsList);
181
- return;
182
- }
183
- // first time hiding a binary
184
- const newMappingsList = mappingsListFromMetadata.filter(mapping => mapping !== binaryToRemove);
185
- setBinaryFrameFilter(newMappingsList);
176
+ // Add a new frame filter to hide this binary using the new ProfileFilters system
177
+ excludeBinary(binaryToRemove);
186
178
  };
187
179
  const handleRowClick = (row) => {
188
180
  // Walk down the stack starting at row until we reach the root (row 0).
@@ -230,7 +222,7 @@ export const FlameGraphArrow = memo(function FlameGraphArrow({ arrow, total, fil
230
222
  currentRow = childRows[0];
231
223
  }
232
224
  const selectedRow = currentRow;
233
- return (_jsx(TooltipProvider, { table: table, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit, compareAbsolute: compareAbsolute, tooltipId: tooltipId, children: _jsxs("div", { className: "relative", children: [_jsx(ContextMenuWrapper, { ref: contextMenuRef, menuId: MENU_ID, table: table, total: total, totalUnfiltered: total + filtered, compareAbsolute: compareAbsolute, resetPath: () => setCurPath([]), hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit, profileType: profileType, isInSandwichView: isInSandwichView }), _jsx(MemoizedTooltip, { contextElement: svgElement, dockedMetainfo: dockedMetainfo }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: Array.from({ length: table.numRows }, (_, row) => (_jsx(FlameNode, { table: table, row: row, colors: colorByColors, colorBy: colorByValue, totalWidth: width ?? 1, height: RowHeight, searchString: currentSearchString ?? '', darkMode: isDarkMode, compareMode: compareMode, colorForSimilarNodes: colorForSimilarNodes, selectedRow: selectedRow, onClick: () => {
225
+ return (_jsx(TooltipProvider, { table: table, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit, compareAbsolute: compareAbsolute, tooltipId: tooltipId, children: _jsxs("div", { className: "relative", children: [_jsx(ContextMenuWrapper, { ref: contextMenuRef, menuId: MENU_ID, table: table, total: total, totalUnfiltered: total + filtered, compareAbsolute: compareAbsolute, resetPath: () => setCurPath([]), hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit, profileType: profileType, isInSandwichView: isInSandwichView }), _jsx(MemoizedTooltip, { contextElement: svgElement, dockedMetainfo: dockedMetainfo }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: Array.from({ length: table.numRows }, (_, row) => (_jsx(FlameNode, { table: table, row: row, colors: colorByColors, colorBy: colorByValue, totalWidth: width ?? 1, height: RowHeight, darkMode: isDarkMode, compareMode: compareMode, colorForSimilarNodes: colorForSimilarNodes, selectedRow: selectedRow, onClick: () => {
234
226
  if (isFlameChart) {
235
227
  // We don't want to expand in flame charts.
236
228
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"AAeA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAGlD,UAAU,KAAK;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,oBAAoB,GAAI,qHAQlC,KAAK,KAAG,IAuIV,CAAC"}
1
+ {"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"AAeA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAGlD,UAAU,KAAK;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,oBAAoB,GAAI,qHAQlC,KAAK,KAAG,IAsIV,CAAC"}
@@ -28,7 +28,7 @@ export const useAutoQuerySelector = ({ selectedProfileName, profileTypesData, se
28
28
  if (querySelection.expression === undefined) {
29
29
  return;
30
30
  }
31
- const profileA = ProfileSelectionFromParams(querySelection.mergeFrom?.toString(), querySelection.mergeTo?.toString(), querySelection.expression, '');
31
+ const profileA = ProfileSelectionFromParams(querySelection.mergeFrom?.toString(), querySelection.mergeTo?.toString(), querySelection.expression);
32
32
  const queryA = {
33
33
  expression: querySelection.expression,
34
34
  from: querySelection.from,
@@ -5,7 +5,6 @@ export interface ProfileSource {
5
5
  ProfileType: () => ProfileType;
6
6
  DiffSelection: () => ProfileDiffSelection;
7
7
  toString: (timezone?: string) => string;
8
- excludeFunction?: boolean;
9
8
  }
10
9
  export interface ProfileSelection {
11
10
  ProfileName: () => string;
@@ -24,15 +23,13 @@ export declare function SuffixParams(params: {
24
23
  }, suffix: string): {
25
24
  [key: string]: any;
26
25
  };
27
- export declare function ProfileSelectionFromParams(mergeFrom: string | undefined, mergeTo: string | undefined, selection: string | undefined, filterQuery?: string, excludeFunction?: boolean): ProfileSelection | null;
26
+ export declare function ProfileSelectionFromParams(mergeFrom: string | undefined, mergeTo: string | undefined, selection: string | undefined): ProfileSelection | null;
28
27
  export declare class MergedProfileSelection implements ProfileSelection {
29
28
  mergeFrom: number;
30
29
  mergeTo: number;
31
30
  query: Query;
32
- filterQuery: string | undefined;
33
- excludeFunction: boolean | undefined;
34
31
  profileSource: ProfileSource;
35
- constructor(mergeFrom: number, mergeTo: number, query: Query, filterQuery?: string, excludeFunction?: boolean);
32
+ constructor(mergeFrom: number, mergeTo: number, query: Query);
36
33
  ProfileName(): string;
37
34
  HistoryParams(): {
38
35
  [key: string]: any;
@@ -43,11 +40,9 @@ export declare class MergedProfileSelection implements ProfileSelection {
43
40
  export declare class ProfileDiffSource implements ProfileSource {
44
41
  a: ProfileSource;
45
42
  b: ProfileSource;
46
- filterQuery: string | undefined;
47
- excludeFunction: boolean | undefined;
48
43
  profileType: ProfileType;
49
44
  absolute?: boolean;
50
- constructor(a: ProfileSource, b: ProfileSource, filterQuery?: string, excludeFunction?: boolean, absolute?: boolean);
45
+ constructor(a: ProfileSource, b: ProfileSource, absolute?: boolean);
51
46
  DiffSelection(): ProfileDiffSelection;
52
47
  QueryRequest(): QueryRequest;
53
48
  ProfileType(): ProfileType;
@@ -58,10 +53,8 @@ export declare class MergedProfileSource implements ProfileSource {
58
53
  mergeFrom: number;
59
54
  mergeTo: number;
60
55
  query: Query;
61
- filterQuery: string | undefined;
62
- excludeFunction: boolean | undefined;
63
56
  profileType: ProfileType;
64
- constructor(mergeFrom: number, mergeTo: number, query: Query, filterQuery?: string, excludeFunction?: boolean);
57
+ constructor(mergeFrom: number, mergeTo: number, query: Query);
65
58
  DiffSelection(): ProfileDiffSelection;
66
59
  QueryRequest(): QueryRequest;
67
60
  ProfileType(): ProfileType;
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileSource.d.ts","sourceRoot":"","sources":["../src/ProfileSource.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,oBAAoB,EAEpB,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqB,WAAW,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAGrE,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,YAAY,CAAC;IACjC,WAAW,EAAE,MAAM,WAAW,CAAC;IAC/B,aAAa,EAAE,MAAM,oBAAoB,CAAC;IAC1C,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IAC1C,aAAa,EAAE,MAAM,aAAa,CAAC;IACnC,IAAI,EAAE,MAAM,MAAM,CAAC;CACp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IAQrC,IAAI,IAAI,MAAM;IAId,aAAa,IAAI,aAAa;CAG/B;AAED,qBAAa,iBAAkB,YAAW,aAAa;IACrD,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAEP,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,OAAO;IAOlE,aAAa,IAAI,oBAAoB;IAIrC,YAAY,IAAI,YAAY;IAgB5B,WAAW,IAAI,WAAW;IAI1B,QAAQ,IAAI,GAAG,CAAC,OAAO;IAQvB,QAAQ,IAAI,MAAM;CAUnB;AAED,qBAAa,mBAAoB,YAAW,aAAa;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;gBAEb,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;IAO5D,aAAa,IAAI,oBAAoB;IAcrC,YAAY,IAAI,YAAY;IAgB5B,WAAW,IAAI,WAAW;IAI1B,cAAc,IAAI,MAAM,EAAE;IAM1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;CAmBpC"}
@@ -30,7 +30,7 @@ export function ParamsString(params) {
30
30
  export function SuffixParams(params, suffix) {
31
31
  return Object.fromEntries(Object.entries(params).map(([key, value]) => [`${key}${suffix}`, value]));
32
32
  }
33
- export function ProfileSelectionFromParams(mergeFrom, mergeTo, selection, filterQuery, excludeFunction) {
33
+ export function ProfileSelectionFromParams(mergeFrom, mergeTo, selection) {
34
34
  if (mergeFrom !== undefined &&
35
35
  mergeTo !== undefined &&
36
36
  selection !== undefined &&
@@ -43,18 +43,16 @@ export function ProfileSelectionFromParams(mergeFrom, mergeTo, selection, filter
43
43
  console.log(selection);
44
44
  return null;
45
45
  }
46
- return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), Query.parse(selection), filterQuery, excludeFunction);
46
+ return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), Query.parse(selection));
47
47
  }
48
48
  return null;
49
49
  }
50
50
  export class MergedProfileSelection {
51
- constructor(mergeFrom, mergeTo, query, filterQuery, excludeFunction) {
51
+ constructor(mergeFrom, mergeTo, query) {
52
52
  this.mergeFrom = mergeFrom;
53
53
  this.mergeTo = mergeTo;
54
54
  this.query = query;
55
- this.filterQuery = filterQuery;
56
- this.excludeFunction = excludeFunction;
57
- this.profileSource = new MergedProfileSource(this.mergeFrom, this.mergeTo, this.query, this.filterQuery, this.excludeFunction);
55
+ this.profileSource = new MergedProfileSource(this.mergeFrom, this.mergeTo, this.query);
58
56
  }
59
57
  ProfileName() {
60
58
  return this.query.profileName();
@@ -74,11 +72,9 @@ export class MergedProfileSelection {
74
72
  }
75
73
  }
76
74
  export class ProfileDiffSource {
77
- constructor(a, b, filterQuery, excludeFunction, absolute) {
75
+ constructor(a, b, absolute) {
78
76
  this.a = a;
79
77
  this.b = b;
80
- this.filterQuery = filterQuery;
81
- this.excludeFunction = excludeFunction;
82
78
  this.profileType = a.ProfileType();
83
79
  this.absolute = absolute;
84
80
  }
@@ -97,7 +93,6 @@ export class ProfileDiffSource {
97
93
  },
98
94
  reportType: QueryRequest_ReportType.FLAMEGRAPH_ARROW,
99
95
  mode: QueryRequest_Mode.DIFF,
100
- filterQuery: this.filterQuery,
101
96
  filter: [],
102
97
  };
103
98
  }
@@ -117,12 +112,10 @@ export class ProfileDiffSource {
117
112
  }
118
113
  }
119
114
  export class MergedProfileSource {
120
- constructor(mergeFrom, mergeTo, query, filterQuery, excludeFunction) {
115
+ constructor(mergeFrom, mergeTo, query) {
121
116
  this.mergeFrom = mergeFrom;
122
117
  this.mergeTo = mergeTo;
123
118
  this.query = query;
124
- this.filterQuery = filterQuery;
125
- this.excludeFunction = excludeFunction;
126
119
  this.profileType = ProfileType.fromString(Query.parse(this.query.toString()).profileName());
127
120
  }
128
121
  DiffSelection() {
@@ -150,7 +143,6 @@ export class MergedProfileSource {
150
143
  },
151
144
  reportType: QueryRequest_ReportType.FLAMEGRAPH_ARROW,
152
145
  mode: QueryRequest_Mode.MERGE,
153
- filterQuery: this.filterQuery,
154
146
  filter: [],
155
147
  };
156
148
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAYrC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oCAA0C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAsGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAarC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oCAA0C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAyGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -19,16 +19,21 @@ import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@pa
19
19
  import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
20
20
  import { getMappingColors } from '../../ProfileFlameGraph/FlameGraphArrow';
21
21
  import useMappingList from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
22
+ import { useProfileFilters } from './ProfileFilters/useProfileFilters';
22
23
  const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
23
24
  const isDarkMode = useAppSelector(selectDarkMode);
24
25
  const currentColorProfile = useCurrentColorProfile();
25
26
  const [colorProfileName] = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key);
26
27
  const [colorByValue, _] = useURLState('color_by');
27
28
  const colorBy = colorByValue === 'binary' || colorByValue === undefined ? 'binary' : 'filename';
28
- const [currentSearchString, setSearchString] = useURLState(`binary_frame_filter`, {
29
- alwaysReturnArray: true,
30
- defaultValue: [],
31
- });
29
+ const { appliedFilters, removeExcludeBinary, excludeBinary } = useProfileFilters();
30
+ // Get current binary filters from the new ProfileFilters system
31
+ const currentBinaryFilters = useMemo(() => {
32
+ return (appliedFilters ?? [])
33
+ .filter(f => f.type === 'frame' && f.field === 'binary')
34
+ .map(f => f.value);
35
+ }, [appliedFilters]);
36
+ console.log('currentBinaryFilters', currentBinaryFilters);
32
37
  const mappingsList = useMappingList(mappings);
33
38
  const mappingColors = useMemo(() => {
34
39
  const colors = getMappingColors(mappingsList, isDarkMode, currentColorProfile);
@@ -56,7 +61,7 @@ const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
56
61
  }
57
62
  return (_jsx("div", { className: "my-4 flex w-full flex-wrap justify-start column-gap-2", children: stackColorArray.map(([feature, color]) => {
58
63
  const filteringAllowed = feature !== EVERYTHING_ELSE;
59
- const isHighlighted = currentSearchString !== undefined ? currentSearchString.includes(feature) : false;
64
+ const isHighlighted = currentBinaryFilters.includes(feature);
60
65
  return (_jsxs("div", { className: cx('flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1', {
61
66
  'cursor-pointer': filteringAllowed && colorBy === 'binary',
62
67
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
@@ -64,12 +69,11 @@ const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
64
69
  if (!filteringAllowed || isHighlighted || colorBy !== 'binary') {
65
70
  return;
66
71
  }
67
- // Check if the current search string is defined and an array
68
- const updatedSearchString = [...currentSearchString, feature]; // If array, append the feature
69
- setSearchString(updatedSearchString);
72
+ // Remove the exclude filter for this binary
73
+ removeExcludeBinary(feature);
70
74
  }, children: [_jsxs("div", { className: "flex w-11/12 items-center justify-start", children: [_jsx("div", { className: "flex w-5 items-center", children: _jsx("div", { className: "mr-1 inline-block h-4 w-4 rounded-[4px]", style: { backgroundColor: color } }) }), _jsx("div", { className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal", children: feature })] }), _jsx("div", { className: "flex w-1/12 justify-end", children: isHighlighted && (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
71
- // remove the current feature from the search string array of strings
72
- setSearchString(currentSearchString.filter((f) => f !== feature));
75
+ // Find and remove the filter for this binary
76
+ excludeBinary(feature);
73
77
  e.stopPropagation();
74
78
  } })) })] }, feature));
75
79
  }) }));
@@ -18,13 +18,11 @@ interface GetDashboardItemProps {
18
18
  setNewCurPath: (path: string[]) => void;
19
19
  curPathArrow: CurrentPathFrame[];
20
20
  setNewCurPathArrow: (path: CurrentPathFrame[]) => void;
21
- currentSearchString?: string;
22
- setSearchString?: (value: string) => void;
23
21
  perf?: {
24
22
  onRender?: ProfilerOnRenderCallback;
25
23
  };
26
24
  queryClient?: QueryServiceClient;
27
25
  }
28
- export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, sourceData, profileSource, total, filtered, curPathArrow, setNewCurPathArrow, currentSearchString, setSearchString, perf, queryClient, }: GetDashboardItemProps) => JSX.Element;
26
+ export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, sourceData, profileSource, total, filtered, curPathArrow, setNewCurPathArrow, perf, queryClient, }: GetDashboardItemProps) => JSX.Element;
29
27
  export {};
30
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
-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AG,CAAC,OA2G9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/DashboardItems/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAW,wBAAwB,EAAC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAIrD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAEnC,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvD,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;IACF,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,eAAO,MAAM,gBAAgB,GAAI,oLAe9B,qBAAqB,KAAG,GAAG,CAAC,OAyG9B,CAAC"}
@@ -17,7 +17,7 @@ import ProfileFlameGraph from '../../../ProfileFlameGraph';
17
17
  import Sandwich from '../../../Sandwich';
18
18
  import { SourceView } from '../../../SourceView';
19
19
  import { Table } from '../../../Table';
20
- export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, sourceData, profileSource, total, filtered, curPathArrow, setNewCurPathArrow, currentSearchString, setSearchString, perf, queryClient, }) => {
20
+ export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, sourceData, profileSource, total, filtered, curPathArrow, setNewCurPathArrow, perf, queryClient, }) => {
21
21
  switch (type) {
22
22
  case 'flamegraph':
23
23
  return (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
@@ -35,7 +35,7 @@ export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphDat
35
35
  : dimensions.width - 16
36
36
  : 0, metadataMappingFiles: flamechartData.metadataMappingFiles, metadataLoading: flamechartData.metadataLoading, profileSource: profileSource, isFlameChart: true }));
37
37
  case 'table':
38
- return topTableData != null ? (_jsx(Table, { total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), currentSearchString: currentSearchString, setSearchString: setSearchString, isHalfScreen: isHalfScreen, metadataMappingFiles: flamegraphData.metadataMappingFiles })) : (_jsx(_Fragment, {}));
38
+ return topTableData != null ? (_jsx(Table, { total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), isHalfScreen: isHalfScreen, metadataMappingFiles: flamegraphData.metadataMappingFiles })) : (_jsx(_Fragment, {}));
39
39
  case 'sandwich':
40
40
  return topTableData != null ? (_jsx(Sandwich, { total: total, filtered: filtered, loading: topTableData.loading, data: topTableData.arrow?.record, unit: topTableData.unit, profileType: profileSource?.ProfileType(), metadataMappingFiles: flamegraphData.metadataMappingFiles, profileSource: profileSource, queryClient: queryClient })) : (_jsx(_Fragment, {}));
41
41
  case 'source':
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/GroupByLabelsDropdown/index.tsx"],"names":[],"mappings":"AAsBA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,qBAAqB,GAAI,uCAAqC,KAAK,KAAG,GAAG,CAAC,OA6D/E,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/GroupByLabelsDropdown/index.tsx"],"names":[],"mappings":"AAsBA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,qBAAqB,GAAI,uCAAqC,KAAK,KAAG,GAAG,CAAC,OA0E/E,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import Select from 'react-select';
15
15
  import { FIELD_LABELS } from '../../../ProfileFlameGraph/FlameGraphArrow';
16
16
  const GroupByLabelsDropdown = ({ labels, groupBy, setGroupByLabels }) => {
17
- return (_jsxs("div", { children: [_jsx("div", { className: "flex items-center justify-between", children: _jsx("label", { className: "text-sm", children: "Group by" }) }), _jsx(Select, { id: "h-group-by-labels-selector", isMulti: true, defaultMenuIsOpen: false, defaultValue: undefined, name: "labels", options: labels.map(label => ({ label, value: `${FIELD_LABELS}.${label}` })), className: "parca-select-container text-sm w-full rounded-md bg-white", classNamePrefix: "parca-select", value: groupBy
17
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "flex items-center justify-between", children: _jsx("label", { className: "text-sm", children: "Group by" }) }), _jsx(Select, { id: "h-group-by-labels-selector", isMulti: true, defaultMenuIsOpen: false, defaultValue: undefined, name: "labels", options: labels.map(label => ({ label, value: `${FIELD_LABELS}.${label}` })), className: "parca-select-container text-sm rounded-md bg-white", classNamePrefix: "parca-select", value: groupBy
18
18
  .filter(l => l.startsWith(FIELD_LABELS))
19
19
  .map(l => ({ value: l, label: l.slice(FIELD_LABELS.length + 1) })), onChange: newValue => {
20
20
  setGroupByLabels(newValue.map(option => option.value));
@@ -35,12 +35,25 @@ const GroupByLabelsDropdown = ({ labels, groupBy, setGroupByLabels }) => {
35
35
  borderRight: '1px solid #e2e8f0',
36
36
  borderLeft: '1px solid #e2e8f0',
37
37
  borderTop: '1px solid #e2e8f0',
38
+ minWidth: '156px',
39
+ width: 'max-content',
40
+ minHeight: '38px',
38
41
  ':hover': {
39
42
  borderColor: '#e2e8f0',
40
43
  borderBottomLeftRadius: 0,
41
44
  borderBottomRightRadius: 0,
42
45
  },
43
46
  }),
47
+ valueContainer: provided => ({
48
+ ...provided,
49
+ flexWrap: 'nowrap',
50
+ overflowX: 'auto',
51
+ padding: '2px 8px',
52
+ }),
53
+ multiValue: provided => ({
54
+ ...provided,
55
+ flex: '0 0 auto',
56
+ }),
44
57
  option: provided => ({
45
58
  ...provided,
46
59
  ':hover': {
@@ -16,6 +16,6 @@ import { Button, useURLState } from '@parca/components';
16
16
  const InvertCallStack = () => {
17
17
  const [invertStack = '', setInvertStack] = useURLState('invert_call_stack');
18
18
  const isInvert = invertStack === 'true';
19
- return (_jsxs(Button, { variant: "neutral", className: "flex items-center gap-2", onClick: () => setInvertStack(isInvert ? '' : 'true'), id: "h-invert-call-stack", children: [_jsx(Icon, { icon: isInvert ? 'ph:sort-ascending' : 'ph:sort-descending', className: "h-4 w-4" }), isInvert ? 'Original' : 'Invert', " Call Stack"] }));
19
+ return (_jsxs(Button, { variant: "neutral", className: "flex items-center gap-2 whitespace-nowrap", onClick: () => setInvertStack(isInvert ? '' : 'true'), id: "h-invert-call-stack", children: [_jsx(Icon, { icon: isInvert ? 'ph:sort-ascending' : 'ph:sort-descending', className: "h-4 w-4" }), isInvert ? 'Original' : 'Invert', " Call Stack"] }));
20
20
  };
21
21
  export default InvertCallStack;
@@ -0,0 +1,5 @@
1
+ import { type ProfileFilter } from './useProfileFilters';
2
+ export declare const isFilterComplete: (filter: ProfileFilter) => boolean;
3
+ declare const ProfileFilters: () => JSX.Element;
4
+ export default ProfileFilters;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ProfileFilters/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAoB,KAAK,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAE1E,eAAO,MAAM,gBAAgB,GAAI,QAAQ,aAAa,KAAG,OAIxD,CAAC;AA4HF,QAAA,MAAM,cAAc,QAAO,GAAG,CAAC,OA6I9B,CAAC;AAEF,eAAe,cAAc,CAAC"}