@parca/profile 0.19.16 → 0.19.18
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.
- package/CHANGELOG.md +8 -0
- package/dist/GraphTooltipArrow/Content.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/DockedGraphTooltip/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/ExpandOnHoverValue.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltip/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +2 -2
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +2 -2
- package/dist/MatchersInput/SuggestionItem.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/index.d.ts.map +1 -1
- package/dist/MetricsCircle/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsContextMenu/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsInfoPanel/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
- package/dist/MetricsGraph/UtilizationMetrics/Throughput.d.ts.map +1 -1
- package/dist/MetricsGraph/UtilizationMetrics/index.d.ts.map +1 -1
- package/dist/MetricsGraph/index.d.ts.map +1 -1
- package/dist/MetricsGraph/useMetricsGraphDimensions.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/AreaGraph/index.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/index.d.ts.map +1 -1
- package/dist/MetricsSeries/index.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerSingle.d.ts.map +1 -1
- package/dist/ProfileExplorer/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.d.ts +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts} +8 -8
- package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js} +14 -14
- package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.js +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -0
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.d.ts +7 -7
- package/dist/ProfileFlameGraph/FlameGraphArrow/index.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.js +38 -12
- package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.d.ts.map +1 -0
- package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.d.ts.map +1 -0
- package/dist/ProfileFlameGraph/FlameGraphArrow/utils.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph → ProfileFlameGraph}/index.d.ts +8 -8
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -0
- package/dist/{ProfileIcicleGraph → ProfileFlameGraph}/index.js +33 -33
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileSelector/CompareButton.d.ts.map +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +1 -1
- package/dist/ProfileSource.d.ts.map +1 -1
- package/dist/ProfileTypeSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +1 -1
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +2 -2
- package/dist/ProfileView/components/DashboardItems/index.d.ts +1 -1
- package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
- package/dist/ProfileView/components/DashboardItems/index.js +7 -7
- package/dist/ProfileView/components/DashboardLayout/index.d.ts +1 -1
- package/dist/ProfileView/components/DashboardLayout/index.d.ts.map +1 -1
- package/dist/ProfileView/components/DiffLegend.js +1 -1
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.d.ts.map +1 -1
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +1 -1
- package/dist/ProfileView/components/ShareButton/ResultBox.d.ts.map +1 -1
- package/dist/ProfileView/components/ShareButton/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.d.ts +5 -5
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +4 -4
- package/dist/ProfileView/components/ViewSelector/Dropdown.d.ts +2 -1
- package/dist/ProfileView/components/ViewSelector/Dropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +2 -2
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +12 -8
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts +1 -1
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationPanel.d.ts +1 -1
- package/dist/ProfileView/components/VisualizationPanel.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationPanel.js +1 -1
- package/dist/ProfileView/context/ProfileViewContext.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useProfileMetadata.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useProfileMetadata.js +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +1 -1
- package/dist/ProfileView/index.d.ts.map +1 -1
- package/dist/ProfileView/index.js +3 -3
- package/dist/ProfileView/types/visualization.d.ts +1 -1
- package/dist/ProfileView/types/visualization.d.ts.map +1 -1
- package/dist/ProfileView/utils/colorUtils.d.ts.map +1 -1
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +10 -10
- package/dist/Sandwich/components/CalleesSection.d.ts +1 -1
- package/dist/Sandwich/components/CalleesSection.d.ts.map +1 -1
- package/dist/Sandwich/components/CalleesSection.js +3 -3
- package/dist/Sandwich/components/CallersSection.d.ts +1 -1
- package/dist/Sandwich/components/CallersSection.d.ts.map +1 -1
- package/dist/Sandwich/components/CallersSection.js +3 -3
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +3 -5
- package/dist/Sandwich/utils/processRowData.d.ts +1 -1
- package/dist/Sandwich/utils/processRowData.d.ts.map +1 -1
- package/dist/SimpleMatchers/index.d.ts.map +1 -1
- package/dist/SourceView/Highlighter.d.ts.map +1 -1
- package/dist/SourceView/LineNo.d.ts.map +1 -1
- package/dist/SourceView/lang-detector/index.d.ts.map +1 -1
- package/dist/Table/ColorCell.d.ts.map +1 -1
- package/dist/Table/ColumnsVisibility.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/hooks/useColorManagement.js +1 -1
- package/dist/Table/index.js +2 -2
- package/dist/Table/utils/functions.d.ts +1 -1
- package/dist/Table/utils/functions.d.ts.map +1 -1
- package/dist/TimelineGuide/index.d.ts.map +1 -1
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/useDelayedLoader.d.ts.map +1 -1
- package/dist/useGrpcQuery/index.d.ts.map +1 -1
- package/dist/useQuery.d.ts.map +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/GraphTooltipArrow/useGraphTooltip/index.ts +2 -2
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +2 -2
- package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.tsx +1 -1
- package/src/{ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx → ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.tsx} +27 -30
- package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.tsx +1 -1
- package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.tsx +55 -23
- package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-10M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-10M.benchmark.tsx} +2 -2
- package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-1M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-1M.benchmark.tsx} +2 -2
- package/src/{ProfileIcicleGraph/benchmarks/ProfileIcicleGraph-20M.benchmark.tsx → ProfileFlameGraph/benchmarks/ProfileFlameGraph-20M.benchmark.tsx} +2 -2
- package/src/{ProfileIcicleGraph → ProfileFlameGraph}/index.tsx +57 -57
- package/src/ProfileSelector/useAutoQuerySelector.ts +1 -1
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +1 -1
- package/src/ProfileView/components/ColorStackLegend.tsx +2 -2
- package/src/ProfileView/components/DashboardItems/index.tsx +8 -8
- package/src/ProfileView/components/DashboardLayout/index.tsx +1 -1
- package/src/ProfileView/components/DiffLegend.tsx +3 -3
- package/src/ProfileView/components/GroupByLabelsDropdown/index.tsx +1 -1
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +1 -1
- package/src/ProfileView/components/Toolbars/index.tsx +7 -7
- package/src/ProfileView/components/ViewSelector/Dropdown.tsx +8 -1
- package/src/ProfileView/components/ViewSelector/index.tsx +12 -7
- package/src/ProfileView/components/VisualizationContainer/index.tsx +1 -1
- package/src/ProfileView/components/VisualizationPanel.tsx +4 -4
- package/src/ProfileView/hooks/useProfileMetadata.ts +1 -1
- package/src/ProfileView/hooks/useVisualizationState.ts +2 -2
- package/src/ProfileView/index.tsx +4 -4
- package/src/ProfileView/types/visualization.ts +2 -2
- package/src/ProfileViewWithData.tsx +10 -10
- package/src/Sandwich/components/CalleesSection.tsx +4 -4
- package/src/Sandwich/components/CallersSection.tsx +5 -5
- package/src/Sandwich/index.tsx +10 -4
- package/src/Sandwich/utils/processRowData.ts +1 -1
- package/src/Table/hooks/useColorManagement.ts +1 -1
- package/src/Table/index.tsx +2 -2
- package/src/Table/utils/functions.ts +1 -1
- package/src/index.tsx +2 -2
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenuWrapper.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/MemoizedTooltip.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/TextWithEllipsis.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/TooltipContext.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/useMappingList.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/useNodeColor.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.d.ts.map +0 -1
- package/dist/ProfileIcicleGraph/index.d.ts.map +0 -1
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenuWrapper.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/MemoizedTooltip.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.js +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.d.ts +0 -0
- /package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.js +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/ContextMenu.tsx +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TextWithEllipsis.tsx +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/TooltipContext.tsx +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useMappingList.ts +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/useNodeColor.ts +0 -0
- /package/src/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/utils.ts +0 -0
- /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
|
-
|
|
23
|
-
|
|
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 {
|
|
35
|
-
import useMappingList from './
|
|
36
|
-
import {CurrentPathFrame, boundsFromProfileSource} from './
|
|
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
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
93
|
+
isFlameChart = false,
|
|
94
94
|
profileSource,
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
isInSandwichView = false,
|
|
96
|
+
isRenderedAsFlamegraph = false,
|
|
97
97
|
tooltipId,
|
|
98
98
|
maxFrameCount,
|
|
99
99
|
isExpanded = false,
|
|
100
|
-
}:
|
|
101
|
-
const {onError, authenticationErrorMessage, isDarkMode,
|
|
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 [
|
|
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 (
|
|
111
|
+
if (isInSandwichView) {
|
|
112
112
|
setLocalCurPathArrow(path);
|
|
113
113
|
} else {
|
|
114
114
|
setNewCurPathArrow(path);
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
[
|
|
117
|
+
[isInSandwichView, setNewCurPathArrow]
|
|
118
118
|
);
|
|
119
119
|
|
|
120
|
-
// Determine which paths to use based on
|
|
121
|
-
const effectiveCurPathArrow =
|
|
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
|
|
187
|
+
const flameGraph = useMemo(() => {
|
|
188
188
|
const {
|
|
189
|
-
isValid:
|
|
189
|
+
isValid: isFlameChartValid,
|
|
190
190
|
isNonDelta,
|
|
191
191
|
isDurationTooLong,
|
|
192
|
-
} =
|
|
193
|
-
?
|
|
192
|
+
} = isFlameChart
|
|
193
|
+
? validateFlameChartQuery(profileSource as MergedProfileSource)
|
|
194
194
|
: {isValid: true, isNonDelta: false, isDurationTooLong: false};
|
|
195
|
-
const
|
|
195
|
+
const isInvalidFlameChartQuery = isFlameChart && !isFlameChartValid;
|
|
196
196
|
|
|
197
|
-
if (isLoading && !
|
|
197
|
+
if (isLoading && !isInvalidFlameChartQuery) {
|
|
198
198
|
return (
|
|
199
199
|
<div className="h-auto overflow-clip">
|
|
200
|
-
{
|
|
201
|
-
<
|
|
200
|
+
{isRenderedAsFlamegraph ? (
|
|
201
|
+
<SandwichFlameGraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
|
|
202
202
|
) : (
|
|
203
|
-
<
|
|
203
|
+
<FlameGraphSkeleton isHalfScreen={isHalfScreen} isDarkMode={isDarkMode} />
|
|
204
204
|
)}
|
|
205
205
|
</div>
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// Do necessary checks to ensure that
|
|
210
|
-
if (
|
|
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
|
|
217
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
|
242
|
-
{
|
|
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
|
-
{
|
|
258
|
+
{isFlameChart ? (
|
|
259
259
|
<TimelineGuide
|
|
260
260
|
bounds={boundsFromProfileSource(profileSource)}
|
|
261
261
|
width={width}
|
|
262
|
-
height={
|
|
262
|
+
height={flameChartHeight ?? 420}
|
|
263
263
|
margin={0}
|
|
264
264
|
ticks={12}
|
|
265
265
|
timeUnit="nanoseconds"
|
|
266
266
|
/>
|
|
267
267
|
) : null}
|
|
268
|
-
<div ref={
|
|
269
|
-
<
|
|
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
|
-
|
|
280
|
+
isFlameChart={isFlameChart}
|
|
281
281
|
profileSource={profileSource}
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
304
|
+
isFlameChart,
|
|
305
305
|
profileSource,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
{
|
|
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="
|
|
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(!
|
|
384
|
-
<>{
|
|
383
|
+
<div className={cx(!isInSandwichView ? 'min-h-48' : '')} id="h-flame-graph">
|
|
384
|
+
<>{flameGraph}</>
|
|
385
385
|
</div>
|
|
386
|
-
{!
|
|
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
|
|
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: ['
|
|
103
|
+
dashboard_items: ['flamegraph'],
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
}, [comparing, querySelection, navigateTo, expressionA, dispatch, loading]);
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
FIELD_CUMULATIVE,
|
|
18
18
|
FIELD_DIFF,
|
|
19
19
|
FIELD_FUNCTION_NAME,
|
|
20
|
-
} from '../../../
|
|
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 '../../
|
|
24
|
-
import useMappingList from '../../
|
|
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
|
|
20
|
-
import {CurrentPathFrame} from '../../../
|
|
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 '
|
|
74
|
+
case 'flamegraph':
|
|
75
75
|
return (
|
|
76
76
|
<ConditionalWrapper
|
|
77
77
|
condition={perf?.onRender != null}
|
|
78
78
|
WrapperComponent={Profiler}
|
|
79
79
|
wrapperProps={{
|
|
80
|
-
id: '
|
|
80
|
+
id: 'flameGraph',
|
|
81
81
|
onRender: perf?.onRender ?? (() => {}),
|
|
82
82
|
}}
|
|
83
83
|
>
|
|
84
|
-
<
|
|
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 '
|
|
107
|
+
case 'flamechart':
|
|
108
108
|
return (
|
|
109
|
-
<
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
101
|
-
|
|
102
|
-
|
|
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>
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
FIELD_FUNCTION_NAME,
|
|
27
27
|
FIELD_LOCATION_ADDRESS,
|
|
28
28
|
FIELD_MAPPING_FILE,
|
|
29
|
-
} from '../../../
|
|
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 '../../../
|
|
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
|
|
65
|
+
export interface FlameGraphToolbarProps {
|
|
66
66
|
curPath: CurrentPathFrame[];
|
|
67
67
|
setNewCurPath: (path: CurrentPathFrame[]) => void;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export interface
|
|
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
|
|
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
|
|
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('
|
|
168
|
+
const isGraphViz = dashboardItems?.includes('flamegraph');
|
|
169
169
|
const isGraphVizOnly = dashboardItems?.length === 1 && isGraphViz;
|
|
170
170
|
|
|
171
171
|
const req = profileSource?.QueryRequest();
|
|
@@ -220,7 +220,7 @@ export const VisualisationToolbar: FC<VisualisationToolbarProps> = ({
|
|
|
220
220
|
{isGraphVizOnly && (
|
|
221
221
|
<>
|
|
222
222
|
<Divider />
|
|
223
|
-
<
|
|
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
|
|
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 = ['
|
|
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
|
-
{
|
|
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: '
|
|
49
|
+
key: 'flamechart',
|
|
46
50
|
label: (
|
|
47
51
|
<span className="relative">
|
|
48
|
-
|
|
52
|
+
Flame Chart
|
|
49
53
|
<span className="absolute top-[-2px] text-xs lowercase text-red-500"> alpha</span>
|
|
50
54
|
</span>
|
|
51
55
|
),
|
|
52
56
|
canBeSelected:
|
|
53
|
-
!dashboardItems.includes('
|
|
57
|
+
!dashboardItems.includes('flamechart') && profileSource?.ProfileType().delta === true,
|
|
54
58
|
disabledText:
|
|
55
|
-
!dashboardItems.includes('
|
|
56
|
-
? '
|
|
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
|
};
|
|
@@ -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
|
-
|
|
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 === '
|
|
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 === '
|
|
73
|
+
isMultiPanelView && dashboardItem === 'flamegraph' && 'pb-[10px]'
|
|
74
74
|
)}
|
|
75
75
|
>
|
|
76
|
-
{dashboardItem === '
|
|
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 '../../
|
|
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 '../../
|
|
25
|
-
import {CurrentPathFrame} from '../../
|
|
24
|
+
} from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
25
|
+
import {CurrentPathFrame} from '../../ProfileFlameGraph/FlameGraphArrow/utils';
|
|
26
26
|
|
|
27
27
|
export const useVisualizationState = (): {
|
|
28
28
|
curPath: string[];
|
|
@@ -20,8 +20,8 @@ import {getDashboardItem} from './components/DashboardItems';
|
|
|
20
20
|
import {DashboardLayout} from './components/DashboardLayout';
|
|
21
21
|
import {ProfileHeader} from './components/ProfileHeader';
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
FlameGraphToolbar,
|
|
24
|
+
SandwichFlameGraphToolbar,
|
|
25
25
|
TableToolbar,
|
|
26
26
|
VisualisationToolbar,
|
|
27
27
|
} from './components/Toolbars';
|
|
@@ -113,7 +113,7 @@ export const ProfileView = ({
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const actionButtons = {
|
|
116
|
-
|
|
116
|
+
flame: <FlameGraphToolbar curPath={curPathArrow} setNewCurPath={setCurPathArrow} />,
|
|
117
117
|
table: (
|
|
118
118
|
<TableToolbar
|
|
119
119
|
profileType={profileSource?.ProfileType()}
|
|
@@ -124,7 +124,7 @@ export const ProfileView = ({
|
|
|
124
124
|
/>
|
|
125
125
|
),
|
|
126
126
|
sandwich: (
|
|
127
|
-
<
|
|
127
|
+
<SandwichFlameGraphToolbar
|
|
128
128
|
resetSandwichFunctionName={resetSandwichFunctionName}
|
|
129
129
|
sandwichFunctionName={sandwichFunctionName}
|
|
130
130
|
/>
|