@parca/profile 0.19.17 → 0.19.19

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 (146) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/GraphTooltipArrow/useGraphTooltip/index.js +2 -2
  3. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +2 -2
  4. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -0
  5. package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.d.ts +1 -1
  6. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.d.ts.map +1 -0
  7. package/dist/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts} +8 -8
  8. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts.map +1 -0
  9. package/dist/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js} +14 -14
  10. package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.d.ts.map +1 -0
  11. package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.js +1 -1
  12. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -0
  13. package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -0
  14. package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.d.ts +7 -7
  15. package/dist/ProfileFlameGraph/FlameGraphArrow/index.d.ts.map +1 -0
  16. package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.js +18 -15
  17. package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.d.ts.map +1 -0
  18. package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.d.ts.map +1 -0
  19. package/dist/ProfileFlameGraph/FlameGraphArrow/utils.d.ts.map +1 -0
  20. package/dist/{ProfileIcicleGraph → ProfileFlameGraph}/index.d.ts +8 -8
  21. package/dist/ProfileFlameGraph/index.d.ts.map +1 -0
  22. package/dist/{ProfileIcicleGraph → ProfileFlameGraph}/index.js +33 -33
  23. package/dist/ProfileSelector/useAutoQuerySelector.js +1 -1
  24. package/dist/ProfileView/components/ActionButtons/GroupByDropdown.d.ts.map +1 -1
  25. package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +1 -1
  26. package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +1 -1
  27. package/dist/ProfileView/components/ColorStackLegend.js +2 -2
  28. package/dist/ProfileView/components/DashboardItems/index.d.ts +1 -1
  29. package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
  30. package/dist/ProfileView/components/DashboardItems/index.js +7 -7
  31. package/dist/ProfileView/components/DashboardLayout/index.d.ts +1 -1
  32. package/dist/ProfileView/components/DashboardLayout/index.d.ts.map +1 -1
  33. package/dist/ProfileView/components/DiffLegend.js +1 -1
  34. package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +1 -1
  35. package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
  36. package/dist/ProfileView/components/InvertCallStack/index.js +1 -1
  37. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +1 -1
  38. package/dist/ProfileView/components/Toolbars/index.d.ts +5 -5
  39. package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
  40. package/dist/ProfileView/components/Toolbars/index.js +4 -4
  41. package/dist/ProfileView/components/ViewSelector/Dropdown.d.ts +2 -1
  42. package/dist/ProfileView/components/ViewSelector/Dropdown.d.ts.map +1 -1
  43. package/dist/ProfileView/components/ViewSelector/Dropdown.js +2 -2
  44. package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
  45. package/dist/ProfileView/components/ViewSelector/index.js +12 -8
  46. package/dist/ProfileView/components/VisualizationContainer/index.d.ts +1 -1
  47. package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
  48. package/dist/ProfileView/components/VisualizationPanel.d.ts +1 -1
  49. package/dist/ProfileView/components/VisualizationPanel.d.ts.map +1 -1
  50. package/dist/ProfileView/components/VisualizationPanel.js +1 -1
  51. package/dist/ProfileView/hooks/useProfileMetadata.js +1 -1
  52. package/dist/ProfileView/hooks/useVisualizationState.d.ts +1 -1
  53. package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
  54. package/dist/ProfileView/hooks/useVisualizationState.js +1 -1
  55. package/dist/ProfileView/index.js +3 -3
  56. package/dist/ProfileView/types/visualization.d.ts +1 -1
  57. package/dist/ProfileView/types/visualization.d.ts.map +1 -1
  58. package/dist/ProfileViewWithData.js +10 -10
  59. package/dist/Sandwich/components/CalleesSection.d.ts +1 -1
  60. package/dist/Sandwich/components/CalleesSection.d.ts.map +1 -1
  61. package/dist/Sandwich/components/CalleesSection.js +3 -3
  62. package/dist/Sandwich/components/CallersSection.d.ts +1 -1
  63. package/dist/Sandwich/components/CallersSection.d.ts.map +1 -1
  64. package/dist/Sandwich/components/CallersSection.js +3 -3
  65. package/dist/Sandwich/index.d.ts.map +1 -1
  66. package/dist/Sandwich/index.js +3 -5
  67. package/dist/Sandwich/utils/processRowData.d.ts +1 -1
  68. package/dist/Sandwich/utils/processRowData.d.ts.map +1 -1
  69. package/dist/Table/hooks/useColorManagement.js +1 -1
  70. package/dist/Table/index.js +2 -2
  71. package/dist/Table/utils/functions.d.ts +1 -1
  72. package/dist/Table/utils/functions.d.ts.map +1 -1
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +2 -2
  76. package/package.json +7 -7
  77. package/src/GraphTooltipArrow/useGraphTooltip/index.ts +2 -2
  78. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +2 -2
  79. package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.tsx +1 -1
  80. package/src/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.tsx} +27 -30
  81. package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.tsx +1 -1
  82. package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.tsx +30 -26
  83. package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-10M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-10M.benchmark.tsx} +2 -2
  84. package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-1M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-1M.benchmark.tsx} +2 -2
  85. package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-20M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-20M.benchmark.tsx} +2 -2
  86. package/src/{ProfileIcicleGraph → ProfileFlameGraph}/index.tsx +57 -57
  87. package/src/ProfileSelector/useAutoQuerySelector.ts +1 -1
  88. package/src/ProfileView/components/ActionButtons/GroupByDropdown.tsx +6 -8
  89. package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +1 -1
  90. package/src/ProfileView/components/ColorStackLegend.tsx +2 -2
  91. package/src/ProfileView/components/DashboardItems/index.tsx +8 -8
  92. package/src/ProfileView/components/DashboardLayout/index.tsx +1 -1
  93. package/src/ProfileView/components/DiffLegend.tsx +3 -3
  94. package/src/ProfileView/components/GroupByLabelsDropdown/index.tsx +1 -1
  95. package/src/ProfileView/components/InvertCallStack/index.tsx +1 -0
  96. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +1 -1
  97. package/src/ProfileView/components/Toolbars/index.tsx +8 -8
  98. package/src/ProfileView/components/ViewSelector/Dropdown.tsx +8 -1
  99. package/src/ProfileView/components/ViewSelector/index.tsx +12 -7
  100. package/src/ProfileView/components/VisualizationContainer/index.tsx +1 -1
  101. package/src/ProfileView/components/VisualizationPanel.tsx +4 -4
  102. package/src/ProfileView/hooks/useProfileMetadata.ts +1 -1
  103. package/src/ProfileView/hooks/useVisualizationState.ts +2 -2
  104. package/src/ProfileView/index.tsx +4 -4
  105. package/src/ProfileView/types/visualization.ts +2 -2
  106. package/src/ProfileViewWithData.tsx +10 -10
  107. package/src/Sandwich/components/CalleesSection.tsx +4 -4
  108. package/src/Sandwich/components/CallersSection.tsx +5 -5
  109. package/src/Sandwich/index.tsx +10 -4
  110. package/src/Sandwich/utils/processRowData.ts +1 -1
  111. package/src/Table/hooks/useColorManagement.ts +1 -1
  112. package/src/Table/index.tsx +2 -2
  113. package/src/Table/utils/functions.ts +1 -1
  114. package/src/index.tsx +2 -2
  115. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts.map +0 -1
  116. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenuWrapper.d.ts.map +0 -1
  117. package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts.map +0 -1
  118. package/dist/ProfileIcicleGraph/IcicleGraphArrow/MemoizedTooltip.d.ts.map +0 -1
  119. package/dist/ProfileIcicleGraph/IcicleGraphArrow/TextWithEllipsis.d.ts.map +0 -1
  120. package/dist/ProfileIcicleGraph/IcicleGraphArrow/TooltipContext.d.ts.map +0 -1
  121. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +0 -1
  122. package/dist/ProfileIcicleGraph/IcicleGraphArrow/useMappingList.d.ts.map +0 -1
  123. package/dist/ProfileIcicleGraph/IcicleGraphArrow/useNodeColor.d.ts.map +0 -1
  124. package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.d.ts.map +0 -1
  125. package/dist/ProfileIcicleGraph/index.d.ts.map +0 -1
  126. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.d.ts +0 -0
  127. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.js +0 -0
  128. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.js +0 -0
  129. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.d.ts +0 -0
  130. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.d.ts +0 -0
  131. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.js +0 -0
  132. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.d.ts +0 -0
  133. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.js +0 -0
  134. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.d.ts +0 -0
  135. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.js +0 -0
  136. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.d.ts +0 -0
  137. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.js +0 -0
  138. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.d.ts +0 -0
  139. /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.js +0 -0
  140. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.tsx +0 -0
  141. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.tsx +0 -0
  142. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.tsx +0 -0
  143. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.ts +0 -0
  144. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.ts +0 -0
  145. /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.ts +0 -0
  146. /package/src/{ProfileIcicleGraph → ProfileFlameGraph}/benchmarks/benchdata/populateData.js +0 -0
@@ -19,8 +19,8 @@ import {useMeasure} from 'react-use';
19
19
 
20
20
  import {FlamegraphArrow} from '@parca/client';
21
21
  import {
22
- FlamegraphSkeleton,
23
- IcicleGraphSkeleton,
22
+ FlameGraphSkeleton,
23
+ SandwichFlameGraphSkeleton,
24
24
  useParcaContext,
25
25
  useURLState,
26
26
  } from '@parca/components';
@@ -31,15 +31,15 @@ import {MergedProfileSource, ProfileSource} from '../ProfileSource';
31
31
  import DiffLegend from '../ProfileView/components/DiffLegend';
32
32
  import {useProfileViewContext} from '../ProfileView/context/ProfileViewContext';
33
33
  import {TimelineGuide} from '../TimelineGuide';
34
- import {IcicleGraphArrow} from './IcicleGraphArrow';
35
- import useMappingList from './IcicleGraphArrow/useMappingList';
36
- import {CurrentPathFrame, boundsFromProfileSource} from './IcicleGraphArrow/utils';
34
+ import {FlameGraphArrow} from './FlameGraphArrow';
35
+ import useMappingList from './FlameGraphArrow/useMappingList';
36
+ import {CurrentPathFrame, boundsFromProfileSource} from './FlameGraphArrow/utils';
37
37
 
38
38
  const numberFormatter = new Intl.NumberFormat('en-US');
39
39
 
40
40
  export type ResizeHandler = (width: number, height: number) => void;
41
41
 
42
- interface ProfileIcicleGraphProps {
42
+ interface ProfileFlameGraphProps {
43
43
  width: number;
44
44
  arrow?: FlamegraphArrow;
45
45
  total: bigint;
@@ -54,9 +54,9 @@ interface ProfileIcicleGraphProps {
54
54
  isHalfScreen: boolean;
55
55
  metadataMappingFiles?: string[];
56
56
  metadataLoading?: boolean;
57
- isIcicleChart?: boolean;
58
- isSandwichIcicleGraph?: boolean;
59
- isFlamegraph?: boolean;
57
+ isFlameChart?: boolean;
58
+ isInSandwichView?: boolean;
59
+ isRenderedAsFlamegraph?: boolean;
60
60
  tooltipId?: string;
61
61
  maxFrameCount?: number;
62
62
  isExpanded?: boolean;
@@ -70,7 +70,7 @@ const ErrorContent = ({errorMessage}: {errorMessage: string | ReactNode}): JSX.E
70
70
  );
71
71
  };
72
72
 
73
- export const validateIcicleChartQuery = (
73
+ export const validateFlameChartQuery = (
74
74
  profileSource: MergedProfileSource
75
75
  ): {isValid: boolean; isNonDelta: boolean; isDurationTooLong: boolean} => {
76
76
  const isNonDelta = !profileSource.ProfileType().delta;
@@ -78,7 +78,7 @@ export const validateIcicleChartQuery = (
78
78
  return {isValid: !isNonDelta && !isDurationTooLong, isNonDelta, isDurationTooLong};
79
79
  };
80
80
 
81
- const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
81
+ const ProfileFlameGraph = function ProfileFlameGraphNonMemo({
82
82
  arrow,
83
83
  total,
84
84
  filtered,
@@ -90,35 +90,35 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
90
90
  width,
91
91
  isHalfScreen,
92
92
  metadataMappingFiles,
93
- isIcicleChart = false,
93
+ isFlameChart = false,
94
94
  profileSource,
95
- isSandwichIcicleGraph = false,
96
- isFlamegraph = false,
95
+ isInSandwichView = false,
96
+ isRenderedAsFlamegraph = false,
97
97
  tooltipId,
98
98
  maxFrameCount,
99
99
  isExpanded = false,
100
- }: ProfileIcicleGraphProps): JSX.Element {
101
- const {onError, authenticationErrorMessage, isDarkMode, iciclechartHelpText} = useParcaContext();
100
+ }: ProfileFlameGraphProps): JSX.Element {
101
+ const {onError, authenticationErrorMessage, isDarkMode, flamechartHelpText} = useParcaContext();
102
102
  const {compareMode} = useProfileViewContext();
103
103
  const [isLoading, setIsLoading] = useState<boolean>(true);
104
- const [icicleChartRef, {height: icicleChartHeight}] = useMeasure();
104
+ const [flameChartRef, {height: flameChartHeight}] = useMeasure();
105
105
 
106
106
  // Create local state for paths when in sandwich view to avoid URL updates
107
107
  const [localCurPathArrow, setLocalCurPathArrow] = useState<CurrentPathFrame[]>([]);
108
108
 
109
109
  const setCurPathArrowWrapper = useCallback(
110
110
  (path: CurrentPathFrame[]) => {
111
- if (isSandwichIcicleGraph) {
111
+ if (isInSandwichView) {
112
112
  setLocalCurPathArrow(path);
113
113
  } else {
114
114
  setNewCurPathArrow(path);
115
115
  }
116
116
  },
117
- [isSandwichIcicleGraph, setNewCurPathArrow]
117
+ [isInSandwichView, setNewCurPathArrow]
118
118
  );
119
119
 
120
- // Determine which paths to use based on isSandwichIcicleGraph flag
121
- const effectiveCurPathArrow = isSandwichIcicleGraph ? localCurPathArrow : curPathArrow;
120
+ // Determine which paths to use based on isInSandwichView flag
121
+ const effectiveCurPathArrow = isInSandwichView ? localCurPathArrow : curPathArrow;
122
122
 
123
123
  const mappingsList = useMappingList(metadataMappingFiles);
124
124
 
@@ -184,37 +184,37 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
184
184
  }
185
185
  }, [loadingState]);
186
186
 
187
- const icicleGraph = useMemo(() => {
187
+ const flameGraph = useMemo(() => {
188
188
  const {
189
- isValid: isIcicleChartValid,
189
+ isValid: isFlameChartValid,
190
190
  isNonDelta,
191
191
  isDurationTooLong,
192
- } = isIcicleChart
193
- ? validateIcicleChartQuery(profileSource as MergedProfileSource)
192
+ } = isFlameChart
193
+ ? validateFlameChartQuery(profileSource as MergedProfileSource)
194
194
  : {isValid: true, isNonDelta: false, isDurationTooLong: false};
195
- const isInvalidIcicleChartQuery = isIcicleChart && !isIcicleChartValid;
195
+ const isInvalidFlameChartQuery = isFlameChart && !isFlameChartValid;
196
196
 
197
- if (isLoading && !isInvalidIcicleChartQuery) {
197
+ if (isLoading && !isInvalidFlameChartQuery) {
198
198
  return (
199
199
  <div className="h-auto overflow-clip">
200
- {isFlamegraph ? (
201
- <FlamegraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
200
+ {isRenderedAsFlamegraph ? (
201
+ <SandwichFlameGraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
202
202
  ) : (
203
- <IcicleGraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
203
+ <FlameGraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
204
204
  )}
205
205
  </div>
206
206
  );
207
207
  }
208
208
 
209
- // Do necessary checks to ensure that icicle chart can be rendered for this query.
210
- if (isInvalidIcicleChartQuery) {
209
+ // Do necessary checks to ensure that flame chart can be rendered for this query.
210
+ if (isInvalidFlameChartQuery) {
211
211
  if (isNonDelta) {
212
212
  return (
213
213
  <ErrorContent
214
214
  errorMessage={
215
215
  <>
216
- <span>To use the Icicle chart, please switch to a Delta profile.</span>
217
- {iciclechartHelpText ?? null}
216
+ <span>To use the Flame chart, please switch to a Delta profile.</span>
217
+ {flamechartHelpText ?? null}
218
218
  </>
219
219
  }
220
220
  />
@@ -225,10 +225,10 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
225
225
  errorMessage={
226
226
  <>
227
227
  <span>
228
- Icicle chart is unavailable for queries longer than one minute. Please select a
228
+ Flame chart is unavailable for queries longer than one minute. Please select a
229
229
  point in the metrics graph to continue.
230
230
  </span>
231
- {iciclechartHelpText ?? null}
231
+ {flamechartHelpText ?? null}
232
232
  </>
233
233
  }
234
234
  />
@@ -238,8 +238,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
238
238
  <ErrorContent
239
239
  errorMessage={
240
240
  <>
241
- <span>The Icicle chart is not available for this query.</span>
242
- {iciclechartHelpText ?? null}
241
+ <span>The Flame chart is not available for this query.</span>
242
+ {flamechartHelpText ?? null}
243
243
  </>
244
244
  }
245
245
  />
@@ -255,18 +255,18 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
255
255
  if (arrow !== undefined) {
256
256
  return (
257
257
  <div className="relative">
258
- {isIcicleChart ? (
258
+ {isFlameChart ? (
259
259
  <TimelineGuide
260
260
  bounds={boundsFromProfileSource(profileSource)}
261
261
  width={width}
262
- height={icicleChartHeight ?? 420}
262
+ height={flameChartHeight ?? 420}
263
263
  margin={0}
264
264
  ticks={12}
265
265
  timeUnit="nanoseconds"
266
266
  />
267
267
  ) : null}
268
- <div ref={icicleChartRef as LegacyRef<HTMLDivElement>}>
269
- <IcicleGraphArrow
268
+ <div ref={flameChartRef as LegacyRef<HTMLDivElement>}>
269
+ <FlameGraphArrow
270
270
  width={width}
271
271
  arrow={arrow}
272
272
  total={total}
@@ -277,10 +277,10 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
277
277
  isHalfScreen={isHalfScreen}
278
278
  mappingsListFromMetadata={mappingsList}
279
279
  compareAbsolute={isCompareAbsolute}
280
- isIcicleChart={isIcicleChart}
280
+ isFlameChart={isFlameChart}
281
281
  profileSource={profileSource}
282
- isFlamegraph={isFlamegraph}
283
- isSandwich={isSandwichIcicleGraph}
282
+ isRenderedAsFlamegraph={isRenderedAsFlamegraph}
283
+ isInSandwichView={isInSandwichView}
284
284
  tooltipId={tooltipId}
285
285
  maxFrameCount={maxFrameCount}
286
286
  isExpanded={isExpanded}
@@ -301,13 +301,13 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
301
301
  isDarkMode,
302
302
  mappingsList,
303
303
  isCompareAbsolute,
304
- isIcicleChart,
304
+ isFlameChart,
305
305
  profileSource,
306
- icicleChartHeight,
307
- icicleChartRef,
308
- iciclechartHelpText,
309
- isFlamegraph,
310
- isSandwichIcicleGraph,
306
+ flameChartHeight,
307
+ flameChartRef,
308
+ flamechartHelpText,
309
+ isRenderedAsFlamegraph,
310
+ isInSandwichView,
311
311
  effectiveCurPathArrow,
312
312
  setCurPathArrowWrapper,
313
313
  tooltipId,
@@ -363,7 +363,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
363
363
  errorMessage={
364
364
  <>
365
365
  <span>{capitalizeOnlyFirstLetter(error.message)}</span>
366
- {isIcicleChart ? iciclechartHelpText ?? null : null}
366
+ {isFlameChart ? flamechartHelpText ?? null : null}
367
367
  </>
368
368
  }
369
369
  />
@@ -374,16 +374,16 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
374
374
  <AnimatePresence>
375
375
  <motion.div
376
376
  className="relative h-full w-full"
377
- key="icicle-graph-loaded"
377
+ key="flame-graph-loaded"
378
378
  initial={{opacity: 0}}
379
379
  animate={{opacity: 1}}
380
380
  transition={{duration: 0.5}}
381
381
  >
382
382
  {compareMode ? <DiffLegend /> : null}
383
- <div className={cx(!isSandwichIcicleGraph ? 'min-h-48' : '')} id="h-icicle-graph">
384
- <>{icicleGraph}</>
383
+ <div className={cx(!isInSandwichView ? 'min-h-48' : '')} id="h-flame-graph">
384
+ <>{flameGraph}</>
385
385
  </div>
386
- {!isSandwichIcicleGraph && (
386
+ {!isInSandwichView && (
387
387
  <p className="my-2 text-xs">
388
388
  Showing {totalFormatted}{' '}
389
389
  {isFiltered ? (
@@ -401,4 +401,4 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
401
401
  );
402
402
  };
403
403
 
404
- export default ProfileIcicleGraph;
404
+ export default ProfileFlameGraph;
@@ -100,7 +100,7 @@ export const useAutoQuerySelector = ({
100
100
  void navigateTo('/', {
101
101
  ...compareQuery,
102
102
  search_string: '',
103
- dashboard_items: ['icicle'],
103
+ dashboard_items: ['flamegraph'],
104
104
  });
105
105
  }
106
106
  }, [comparing, querySelection, navigateTo, expressionA, dispatch, loading]);
@@ -23,14 +23,12 @@ interface GroupByControlsProps {
23
23
 
24
24
  const GroupByControls: React.FC<GroupByControlsProps> = ({groupBy, labels, setGroupByLabels}) => {
25
25
  return (
26
- <div className="inline-flex items-start">
27
- <div className="relative flex gap-3 items-start">
28
- <GroupByLabelsDropdown
29
- labels={labels}
30
- groupBy={groupBy}
31
- setGroupByLabels={setGroupByLabels}
32
- />
33
- </div>
26
+ <div className="relative flex" id="h-group-by-controls">
27
+ <GroupByLabelsDropdown
28
+ labels={labels}
29
+ groupBy={groupBy}
30
+ setGroupByLabels={setGroupByLabels}
31
+ />
34
32
  </div>
35
33
  );
36
34
  };
@@ -17,7 +17,7 @@ import {
17
17
  FIELD_CUMULATIVE,
18
18
  FIELD_DIFF,
19
19
  FIELD_FUNCTION_NAME,
20
- } from '../../../ProfileIcicleGraph/IcicleGraphArrow';
20
+ } from '../../../ProfileFlameGraph/FlameGraphArrow';
21
21
  import {useProfileViewContext} from '../../context/ProfileViewContext';
22
22
 
23
23
  const SortByDropdown = (): React.JSX.Element => {
@@ -20,8 +20,8 @@ import {useURLState} from '@parca/components';
20
20
  import {USER_PREFERENCES, useCurrentColorProfile, useUserPreference} from '@parca/hooks';
21
21
  import {EVERYTHING_ELSE, selectDarkMode, useAppSelector} from '@parca/store';
22
22
 
23
- import {getMappingColors} from '../../ProfileIcicleGraph/IcicleGraphArrow';
24
- import useMappingList from '../../ProfileIcicleGraph/IcicleGraphArrow/useMappingList';
23
+ import {getMappingColors} from '../../ProfileFlameGraph/FlameGraphArrow';
24
+ import useMappingList from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
25
25
 
26
26
  interface Props {
27
27
  mappings?: string[];
@@ -16,8 +16,8 @@ import {Profiler, ProfilerOnRenderCallback} from 'react';
16
16
  import {QueryServiceClient} from '@parca/client';
17
17
  import {ConditionalWrapper} from '@parca/components';
18
18
 
19
- import ProfileIcicleGraph from '../../../ProfileIcicleGraph';
20
- import {CurrentPathFrame} from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
19
+ import ProfileFlameGraph from '../../../ProfileFlameGraph';
20
+ import {CurrentPathFrame} from '../../../ProfileFlameGraph/FlameGraphArrow/utils';
21
21
  import {ProfileSource} from '../../../ProfileSource';
22
22
  import Sandwich from '../../../Sandwich';
23
23
  import {SourceView} from '../../../SourceView';
@@ -71,17 +71,17 @@ export const getDashboardItem = ({
71
71
  queryClient,
72
72
  }: GetDashboardItemProps): JSX.Element => {
73
73
  switch (type) {
74
- case 'icicle':
74
+ case 'flamegraph':
75
75
  return (
76
76
  <ConditionalWrapper
77
77
  condition={perf?.onRender != null}
78
78
  WrapperComponent={Profiler}
79
79
  wrapperProps={{
80
- id: 'icicleGraph',
80
+ id: 'flameGraph',
81
81
  onRender: perf?.onRender ?? (() => {}),
82
82
  }}
83
83
  >
84
- <ProfileIcicleGraph
84
+ <ProfileFlameGraph
85
85
  curPathArrow={curPathArrow}
86
86
  setNewCurPathArrow={setNewCurPathArrow}
87
87
  arrow={flamegraphData?.arrow}
@@ -104,9 +104,9 @@ export const getDashboardItem = ({
104
104
  />
105
105
  </ConditionalWrapper>
106
106
  );
107
- case 'iciclechart':
107
+ case 'flamechart':
108
108
  return (
109
- <ProfileIcicleGraph
109
+ <ProfileFlameGraph
110
110
  curPathArrow={[]}
111
111
  setNewCurPathArrow={() => {}}
112
112
  arrow={flamechartData?.arrow}
@@ -126,7 +126,7 @@ export const getDashboardItem = ({
126
126
  metadataMappingFiles={flamechartData.metadataMappingFiles}
127
127
  metadataLoading={flamechartData.metadataLoading}
128
128
  profileSource={profileSource}
129
- isIcicleChart={true}
129
+ isFlameChart={true}
130
130
  />
131
131
  );
132
132
  case 'table':
@@ -29,7 +29,7 @@ import {VisualizationContainer} from '../VisualizationContainer';
29
29
  interface DashboardLayoutProps {
30
30
  getDashboardItemByType: (props: {type: VisualizationType; isHalfScreen: boolean}) => JSX.Element;
31
31
  actionButtons: {
32
- icicle: JSX.Element;
32
+ flame: JSX.Element;
33
33
  table: JSX.Element;
34
34
  };
35
35
  }
@@ -97,9 +97,9 @@ const DiffLegend = (): JSX.Element => {
97
97
  <div className="bg-gray-50 p-4 dark:bg-gray-800">
98
98
  <div className="flex items-center justify-center"></div>
99
99
  <span className="block text-sm text-gray-500 dark:text-gray-50">
100
- This is a differential icicle graph, where a purple-colored node means
101
- unchanged, and the darker the red, the worse the node got, and the darker the
102
- green, the better the node got.
100
+ This is a differential flame graph, where a purple-colored node means unchanged,
101
+ and the darker the red, the worse the node got, and the darker the green, the
102
+ better the node got.
103
103
  </span>
104
104
  </div>
105
105
  </div>
@@ -13,7 +13,7 @@
13
13
 
14
14
  import Select from 'react-select';
15
15
 
16
- import {FIELD_LABELS} from '../../../ProfileIcicleGraph/IcicleGraphArrow';
16
+ import {FIELD_LABELS} from '../../../ProfileFlameGraph/FlameGraphArrow';
17
17
 
18
18
  interface LabelOption {
19
19
  label: string;
@@ -24,6 +24,7 @@ const InvertCallStack = (): JSX.Element => {
24
24
  variant="neutral"
25
25
  className="flex items-center gap-2"
26
26
  onClick={() => setInvertStack(isInvert ? '' : 'true')}
27
+ id="h-invert-call-stack"
27
28
  >
28
29
  <Icon icon={isInvert ? 'ph:sort-ascending' : 'ph:sort-descending'} className="h-4 w-4" />
29
30
  {isInvert ? 'Original' : 'Invert'} Call Stack
@@ -26,7 +26,7 @@ import {
26
26
  FIELD_FUNCTION_NAME,
27
27
  FIELD_LOCATION_ADDRESS,
28
28
  FIELD_MAPPING_FILE,
29
- } from '../../../ProfileIcicleGraph/IcicleGraphArrow';
29
+ } from '../../../ProfileFlameGraph/FlameGraphArrow';
30
30
  import {useProfileViewContext} from '../../context/ProfileViewContext';
31
31
  import SwitchMenuItem from './SwitchMenuItem';
32
32
 
@@ -19,7 +19,7 @@ import {QueryServiceClient} from '@parca/client';
19
19
  import {Button} from '@parca/components';
20
20
  import {ProfileType} from '@parca/parser';
21
21
 
22
- import {CurrentPathFrame} from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
22
+ import {CurrentPathFrame} from '../../../ProfileFlameGraph/FlameGraphArrow/utils';
23
23
  import {ProfileSource} from '../../../ProfileSource';
24
24
  import {useDashboard} from '../../context/DashboardContext';
25
25
  import GroupByDropdown from '../ActionButtons/GroupByDropdown';
@@ -62,12 +62,12 @@ export interface TableToolbarProps {
62
62
  currentSearchString?: string;
63
63
  }
64
64
 
65
- export interface IcicleGraphToolbarProps {
65
+ export interface FlameGraphToolbarProps {
66
66
  curPath: CurrentPathFrame[];
67
67
  setNewCurPath: (path: CurrentPathFrame[]) => void;
68
68
  }
69
69
 
70
- export interface SandwichIcicleGraphToolbarProps {
70
+ export interface SandwichFlameGraphToolbarProps {
71
71
  resetSandwichFunctionName: () => void;
72
72
  sandwichFunctionName?: string;
73
73
  }
@@ -98,7 +98,7 @@ export const TableToolbar: FC<TableToolbarProps> = ({
98
98
  );
99
99
  };
100
100
 
101
- export const IcicleGraphToolbar: FC<IcicleGraphToolbarProps> = ({curPath, setNewCurPath}) => {
101
+ export const FlameGraphToolbar: FC<FlameGraphToolbarProps> = ({curPath, setNewCurPath}) => {
102
102
  return (
103
103
  <>
104
104
  <div className="flex w-full gap-2 items-end">
@@ -117,7 +117,7 @@ export const IcicleGraphToolbar: FC<IcicleGraphToolbarProps> = ({curPath, setNew
117
117
  );
118
118
  };
119
119
 
120
- export const SandwichIcicleGraphToolbar: FC<SandwichIcicleGraphToolbarProps> = ({
120
+ export const SandwichFlameGraphToolbar: FC<SandwichFlameGraphToolbarProps> = ({
121
121
  resetSandwichFunctionName,
122
122
  sandwichFunctionName,
123
123
  }) => {
@@ -165,7 +165,7 @@ export const VisualisationToolbar: FC<VisualisationToolbarProps> = ({
165
165
 
166
166
  const isTableViz = dashboardItems?.includes('table');
167
167
  const isTableVizOnly = dashboardItems?.length === 1 && isTableViz;
168
- const isGraphViz = dashboardItems?.includes('icicle');
168
+ const isGraphViz = dashboardItems?.includes('flamegraph');
169
169
  const isGraphVizOnly = dashboardItems?.length === 1 && isGraphViz;
170
170
 
171
171
  const req = profileSource?.QueryRequest();
@@ -178,7 +178,7 @@ export const VisualisationToolbar: FC<VisualisationToolbarProps> = ({
178
178
  return (
179
179
  <>
180
180
  <div className="flex w-full justify-between items-end">
181
- <div className="flex gap-3 items-end">
181
+ <div className="flex gap-2 items-end">
182
182
  {isGraphViz && (
183
183
  <>
184
184
  <GroupByDropdown
@@ -220,7 +220,7 @@ export const VisualisationToolbar: FC<VisualisationToolbarProps> = ({
220
220
  {isGraphVizOnly && (
221
221
  <>
222
222
  <Divider />
223
- <IcicleGraphToolbar curPath={curPath} setNewCurPath={setNewCurPath} />
223
+ <FlameGraphToolbar curPath={curPath} setNewCurPath={setNewCurPath} />
224
224
  </>
225
225
  )}
226
226
  {isTableVizOnly && (
@@ -59,6 +59,7 @@ const Dropdown = ({
59
59
  disabled = false,
60
60
  icon,
61
61
  id,
62
+ optionsClassName = '',
62
63
  }: {
63
64
  items: DropdownItem[];
64
65
  selectedKey: string | undefined;
@@ -71,6 +72,7 @@ const Dropdown = ({
71
72
  disabled?: boolean;
72
73
  icon?: JSX.Element;
73
74
  id?: string;
75
+ optionsClassName?: string;
74
76
  }): JSX.Element => {
75
77
  const selection = items.find(v => v.key === selectedKey) ?? {
76
78
  key: selectedKey,
@@ -113,7 +115,12 @@ const Dropdown = ({
113
115
  leaveFrom="opacity-100"
114
116
  leaveTo="opacity-0"
115
117
  >
116
- <Listbox.Options className="absolute w-[246px] right-0 z-50 mt-1 max-h-[50vh] overflow-auto rounded-md bg-gray-50 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-gray-600 dark:bg-gray-900 dark:ring-white dark:ring-opacity-20 sm:text-sm">
118
+ <Listbox.Options
119
+ className={cx(
120
+ optionsClassName,
121
+ 'absolute w-[246px] right-0 z-50 mt-1 max-h-[50vh] overflow-auto rounded-md bg-gray-50 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:border-gray-600 dark:bg-gray-900 dark:ring-white dark:ring-opacity-20 sm:text-sm'
122
+ )}
123
+ >
117
124
  {loading === true ? (
118
125
  <div className="w-[270px]">{loader}</div>
119
126
  ) : (
@@ -23,7 +23,7 @@ interface Props {
23
23
  }
24
24
 
25
25
  const ViewSelector = ({profileSource}: Props): JSX.Element => {
26
- const [dashboardItems = ['icicle'], setDashboardItems] = useURLState<string[]>(
26
+ const [dashboardItems = ['flamegraph'], setDashboardItems] = useURLState<string[]>(
27
27
  'dashboard_items',
28
28
  {
29
29
  alwaysReturnArray: true,
@@ -39,21 +39,25 @@ const ViewSelector = ({profileSource}: Props): JSX.Element => {
39
39
  supportingText?: string;
40
40
  disabledText?: string;
41
41
  }> = [
42
- {key: 'icicle', label: 'icicle', canBeSelected: !dashboardItems.includes('icicle')},
42
+ {
43
+ key: 'flamegraph',
44
+ label: 'Flame Graph',
45
+ canBeSelected: !dashboardItems.includes('flamegraph'),
46
+ },
43
47
  {key: 'table', label: 'Table', canBeSelected: !dashboardItems.includes('table')},
44
48
  {
45
- key: 'iciclechart',
49
+ key: 'flamechart',
46
50
  label: (
47
51
  <span className="relative">
48
- Iciclechart
52
+ Flame Chart
49
53
  <span className="absolute top-[-2px] text-xs lowercase text-red-500">&nbsp;alpha</span>
50
54
  </span>
51
55
  ),
52
56
  canBeSelected:
53
- !dashboardItems.includes('iciclechart') && profileSource?.ProfileType().delta === true,
57
+ !dashboardItems.includes('flamechart') && profileSource?.ProfileType().delta === true,
54
58
  disabledText:
55
- !dashboardItems.includes('iciclechart') && profileSource?.ProfileType().delta !== true
56
- ? 'Iciclechart is not available for non-delta profiles'
59
+ !dashboardItems.includes('flamechart') && profileSource?.ProfileType().delta !== true
60
+ ? 'Flamechart is not available for non-delta profiles'
57
61
  : undefined,
58
62
  },
59
63
  ];
@@ -169,6 +173,7 @@ const ViewSelector = ({profileSource}: Props): JSX.Element => {
169
173
  onSelection={onSelection}
170
174
  placeholder={'Select view type...'}
171
175
  id="h-view-selector"
176
+ optionsClassName="min-w-[260px]"
172
177
  />
173
178
  );
174
179
  };
@@ -28,7 +28,7 @@ interface VisualizationContainerProps {
28
28
  isMultiPanelView: boolean;
29
29
  index: number;
30
30
  actionButtons: {
31
- icicle: JSX.Element;
31
+ flame: JSX.Element;
32
32
  table: JSX.Element;
33
33
  };
34
34
  }
@@ -30,7 +30,7 @@ interface Props {
30
30
  dragHandleProps: DraggableProvidedDragHandleProps | null | undefined;
31
31
  getDashboardItemByType: (props: {type: VisualizationType; isHalfScreen: boolean}) => JSX.Element;
32
32
  actionButtons: {
33
- icicle: JSX.Element;
33
+ flame: JSX.Element;
34
34
  table: JSX.Element;
35
35
  };
36
36
  }
@@ -51,7 +51,7 @@ export const VisualizationPanel = React.memo(function VisualizationPanel({
51
51
  <div
52
52
  className={cx(
53
53
  'flex w-full justify-between flex-col-reverse md:flex-row',
54
- isMultiPanelView && dashboardItem === 'icicle' ? 'items-end gap-x-2' : 'items-end'
54
+ isMultiPanelView && dashboardItem === 'flamegraph' ? 'items-end gap-x-2' : 'items-end'
55
55
  )}
56
56
  >
57
57
  <div className="flex items-center gap-2">
@@ -70,10 +70,10 @@ export const VisualizationPanel = React.memo(function VisualizationPanel({
70
70
  <div
71
71
  className={cx(
72
72
  'flex flex-row items-center gap-4',
73
- isMultiPanelView && dashboardItem === 'icicle' && 'pb-[10px]'
73
+ isMultiPanelView && dashboardItem === 'flamegraph' && 'pb-[10px]'
74
74
  )}
75
75
  >
76
- {dashboardItem === 'icicle' && flamegraphHint != null ? (
76
+ {dashboardItem === 'flamegraph' && flamegraphHint != null ? (
77
77
  <div className="px-2">{flamegraphHint}</div>
78
78
  ) : null}
79
79
  </div>
@@ -19,7 +19,7 @@ import {FlamegraphArrow} from '@parca/client';
19
19
 
20
20
  import useMappingList, {
21
21
  useFilenamesList,
22
- } from '../../ProfileIcicleGraph/IcicleGraphArrow/useMappingList';
22
+ } from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
23
23
 
24
24
  interface UseProfileMetadataProps {
25
25
  flamegraphArrow?: FlamegraphArrow;
@@ -21,8 +21,8 @@ import {
21
21
  FIELD_LABELS,
22
22
  FIELD_LOCATION_ADDRESS,
23
23
  FIELD_MAPPING_FILE,
24
- } from '../../ProfileIcicleGraph/IcicleGraphArrow';
25
- import {CurrentPathFrame} from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
24
+ } from '../../ProfileFlameGraph/FlameGraphArrow';
25
+ import {CurrentPathFrame} from '../../ProfileFlameGraph/FlameGraphArrow/utils';
26
26
 
27
27
  export const useVisualizationState = (): {
28
28
  curPath: string[];