@parca/profile 0.19.17 → 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 +4 -0
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +2 -2
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +2 -2
- 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 +21 -15
- 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/ProfileSelector/useAutoQuerySelector.js +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +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.js +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +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/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.js +3 -3
- package/dist/ProfileView/types/visualization.d.ts +1 -1
- package/dist/ProfileView/types/visualization.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/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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- 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 +34 -27
- 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
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.18](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.17...@parca/profile@0.19.18) (2025-07-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.19.17](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.16...@parca/profile@0.19.17) (2025-07-09)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { divide, valueFormatter } from '@parca/utilities';
|
|
14
|
-
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FLAT, FIELD_LOCATION_ADDRESS, } from '../../
|
|
15
|
-
import { getTextForCumulative, nodeLabel } from '../../
|
|
14
|
+
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FLAT, FIELD_LOCATION_ADDRESS, } from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
15
|
+
import { getTextForCumulative, nodeLabel } from '../../ProfileFlameGraph/FlameGraphArrow/utils';
|
|
16
16
|
export const useGraphTooltip = ({ table, profileType, unit, compareAbsolute, total, totalUnfiltered, row, }) => {
|
|
17
17
|
if (row === null || profileType === undefined) {
|
|
18
18
|
return null;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { QueryRequest_ReportType } from '@parca/client';
|
|
14
14
|
import { useParcaContext, useURLState } from '@parca/components';
|
|
15
|
-
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_START_LINE, FIELD_FUNCTION_SYSTEM_NAME, FIELD_INLINED, FIELD_LOCATION_ADDRESS, FIELD_LOCATION_LINE, FIELD_MAPPING_BUILD_ID, FIELD_MAPPING_FILE, FIELD_TIMESTAMP, } from '../../
|
|
16
|
-
import { arrowToString } from '../../
|
|
15
|
+
import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_START_LINE, FIELD_FUNCTION_SYSTEM_NAME, FIELD_INLINED, FIELD_LOCATION_ADDRESS, FIELD_LOCATION_LINE, FIELD_MAPPING_BUILD_ID, FIELD_MAPPING_FILE, FIELD_TIMESTAMP, } from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
16
|
+
import { arrowToString } from '../../ProfileFlameGraph/FlameGraphArrow/utils';
|
|
17
17
|
import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
|
|
18
18
|
import { useQuery } from '../../useQuery';
|
|
19
19
|
export const useGraphTooltipMetaInfo = ({ table, row }) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAOnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAO1C,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,kIAalB,gBAAgB,KAAG,GAAG,CAAC,OAmOzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -11,7 +11,7 @@ interface ContextMenuWrapperProps {
|
|
|
11
11
|
hideMenu: () => void;
|
|
12
12
|
hideBinary: (binaryToRemove: string) => void;
|
|
13
13
|
unit?: string;
|
|
14
|
-
|
|
14
|
+
isInSandwichView?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export interface ContextMenuWrapperRef {
|
|
17
17
|
setRow: (row: number, callback?: () => void) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenuWrapper.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,UAAU,uBAAuB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACtD;AAED,QAAA,MAAM,kBAAkB,2HAkBvB,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare const RowHeight = 26;
|
|
|
6
6
|
export interface colorByColors {
|
|
7
7
|
[key: string]: string;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface FlameNodeProps {
|
|
10
10
|
height: number;
|
|
11
11
|
totalWidth: number;
|
|
12
12
|
table: Table<any>;
|
|
@@ -20,24 +20,24 @@ export interface IcicleNodeProps {
|
|
|
20
20
|
colorForSimilarNodes: string;
|
|
21
21
|
selectedRow: number;
|
|
22
22
|
onClick: () => void;
|
|
23
|
-
|
|
23
|
+
isFlameChart: boolean;
|
|
24
24
|
profileSource: ProfileSource;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
isRenderedAsFlamegraph?: boolean;
|
|
26
|
+
isInSandwichView?: boolean;
|
|
27
27
|
maxDepth?: number;
|
|
28
28
|
effectiveDepth?: number;
|
|
29
29
|
tooltipId?: string;
|
|
30
30
|
hoveringRow?: number;
|
|
31
31
|
setHoveringRow: (row: number | undefined) => void;
|
|
32
32
|
}
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const flameRectStyles: {
|
|
34
34
|
cursor: string;
|
|
35
35
|
transition: string;
|
|
36
36
|
};
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const fadedFlameRectStyles: {
|
|
38
38
|
cursor: string;
|
|
39
39
|
transition: string;
|
|
40
40
|
opacity: string;
|
|
41
41
|
};
|
|
42
|
-
export declare const
|
|
43
|
-
//# sourceMappingURL=
|
|
42
|
+
export declare const FlameNode: React.NamedExoticComponent<FlameNodeProps>;
|
|
43
|
+
//# sourceMappingURL=FlameGraphNodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlameGraphNodes.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAErC,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAelD,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,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,4CA2NpB,CAAC"}
|
|
@@ -21,16 +21,16 @@ import { FIELD_CUMULATIVE, FIELD_DEPTH, FIELD_DIFF, FIELD_FUNCTION_FILE_NAME, FI
|
|
|
21
21
|
import useNodeColor from './useNodeColor';
|
|
22
22
|
import { arrowToString, boundsFromProfileSource, nodeLabel } from './utils';
|
|
23
23
|
export const RowHeight = 26;
|
|
24
|
-
export const
|
|
24
|
+
export const flameRectStyles = {
|
|
25
25
|
cursor: 'pointer',
|
|
26
26
|
transition: 'opacity .15s linear',
|
|
27
27
|
};
|
|
28
|
-
export const
|
|
28
|
+
export const fadedFlameRectStyles = {
|
|
29
29
|
cursor: 'pointer',
|
|
30
30
|
transition: 'opacity .15s linear',
|
|
31
31
|
opacity: '0.5',
|
|
32
32
|
};
|
|
33
|
-
export const
|
|
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', }) {
|
|
34
34
|
// get the columns to read from
|
|
35
35
|
const mappingColumn = table.getChild(FIELD_MAPPING_FILE);
|
|
36
36
|
const functionNameColumn = table.getChild(FIELD_FUNCTION_NAME);
|
|
@@ -86,31 +86,31 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
|
|
|
86
86
|
// If the end of the node is before the selection offset or the start of the node is after the selection offset + totalWidth, we don't render it.
|
|
87
87
|
return _jsx(_Fragment, {});
|
|
88
88
|
}
|
|
89
|
-
if (row === 0 && (
|
|
90
|
-
// The root node is not rendered in the
|
|
89
|
+
if (row === 0 && (isFlameChart || isInSandwichView)) {
|
|
90
|
+
// The root node is not rendered in the flame chart or sandwich view, so we return null.
|
|
91
91
|
return _jsx(_Fragment, {});
|
|
92
92
|
}
|
|
93
93
|
// Cumulative can be larger than total when a selection is made. All parents of the selection are likely larger, but we want to only show them as 100% in the graph.
|
|
94
94
|
const tsBounds = boundsFromProfileSource(profileSource);
|
|
95
95
|
const total = cumulativeColumn?.get(selectedRow);
|
|
96
96
|
const totalRatio = cumulative > total ? 1 : Number(cumulative) / Number(total);
|
|
97
|
-
const width =
|
|
97
|
+
const width = isFlameChart
|
|
98
98
|
? (Number(cumulative) / (Number(tsBounds[1]) - Number(tsBounds[0]))) * totalWidth
|
|
99
99
|
: totalRatio * totalWidth;
|
|
100
100
|
if (width <= 1) {
|
|
101
101
|
return _jsx(_Fragment, {});
|
|
102
102
|
}
|
|
103
103
|
const selectedDepth = depthColumn?.get(selectedRow);
|
|
104
|
-
const styles = selectedDepth !== undefined && selectedDepth > depth ?
|
|
104
|
+
const styles = selectedDepth !== undefined && selectedDepth > depth ? fadedFlameRectStyles : flameRectStyles;
|
|
105
105
|
const onMouseEnter = () => {
|
|
106
106
|
setHoveringRow(row);
|
|
107
|
-
window.dispatchEvent(new CustomEvent(`
|
|
107
|
+
window.dispatchEvent(new CustomEvent(`flame-tooltip-update-${tooltipId}`, {
|
|
108
108
|
detail: { row },
|
|
109
109
|
}));
|
|
110
110
|
};
|
|
111
111
|
const onMouseLeave = () => {
|
|
112
112
|
setHoveringRow(undefined);
|
|
113
|
-
window.dispatchEvent(new CustomEvent(`
|
|
113
|
+
window.dispatchEvent(new CustomEvent(`flame-tooltip-update-${tooltipId}`, {
|
|
114
114
|
detail: { row: null },
|
|
115
115
|
}));
|
|
116
116
|
};
|
|
@@ -118,21 +118,21 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
|
|
|
118
118
|
onContextMenu(e, row);
|
|
119
119
|
};
|
|
120
120
|
const ts = tsColumn !== null ? Number(tsColumn.get(row)) : 0;
|
|
121
|
-
const x =
|
|
121
|
+
const x = isFlameChart && tsColumn !== null
|
|
122
122
|
? ((ts - Number(tsBounds[0])) / (Number(tsBounds[1]) - Number(tsBounds[0]))) * totalWidth
|
|
123
123
|
: selectedDepth > depth
|
|
124
124
|
? 0
|
|
125
125
|
: ((Number(valueOffset) - Number(selectionOffset)) / Number(total)) * totalWidth;
|
|
126
|
-
const calculateY = (
|
|
127
|
-
if (
|
|
126
|
+
const calculateY = (isRenderedAsFlamegraph, isInSandwichView, isFlameChart, maxDepth, depth, height) => {
|
|
127
|
+
if (isRenderedAsFlamegraph) {
|
|
128
128
|
return (maxDepth - depth) * height; // Flamegraph is inverted
|
|
129
129
|
}
|
|
130
|
-
if (
|
|
130
|
+
if (isFlameChart || isInSandwichView) {
|
|
131
131
|
return (depth - 1) * height;
|
|
132
132
|
}
|
|
133
133
|
return depth * height;
|
|
134
134
|
};
|
|
135
|
-
const y = calculateY(
|
|
135
|
+
const y = calculateY(isRenderedAsFlamegraph, isInSandwichView, isFlameChart, effectiveDepth ?? maxDepth, depth, height);
|
|
136
136
|
return (_jsx(_Fragment, { children: _jsxs("g", { id: row === 0 ? 'root-span' : undefined, transform: `translate(${x + 1}, ${y + 1})`, style: styles, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick, onContextMenu: handleContextMenu, children: [_jsx("rect", { x: 0, y: 0, width: width, height: height, style: {
|
|
137
137
|
fill: colorResult,
|
|
138
138
|
}, className: cx(shouldBeHighlighted
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoizedTooltip.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAOvD,UAAU,oBAAoB;IAC5B,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,kDAwE1B,CAAC"}
|
|
@@ -25,7 +25,7 @@ export const MemoizedTooltip = memo(function MemoizedTooltip({ contextElement, d
|
|
|
25
25
|
const handleTooltipUpdate = (event) => {
|
|
26
26
|
setTooltipRow(event.detail.row);
|
|
27
27
|
};
|
|
28
|
-
const eventName = `
|
|
28
|
+
const eventName = `flame-tooltip-update-${tooltipId}`;
|
|
29
29
|
// Delay to ensure all DOM updates and React renders are complete
|
|
30
30
|
// This fixes the race condition in sandwich view
|
|
31
31
|
const timeoutId = setTimeout(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextWithEllipsis.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx"],"names":[],"mappings":"AAiBA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AA2CD,iBAAS,gBAAgB,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAC,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAuBjE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,UAAU,YAAY;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,UAAU,mBAAmB;IAC3B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,eAAO,MAAM,iBAAiB,QAAO,mBAMpC,CAAC;AAEF,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqC1D,CAAC"}
|
package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.d.ts
RENAMED
|
@@ -3,7 +3,7 @@ import { FlamegraphArrow } from '@parca/client';
|
|
|
3
3
|
import { ProfileType } from '@parca/parser';
|
|
4
4
|
import { type ColorConfig } from '@parca/utilities';
|
|
5
5
|
import { ProfileSource } from '../../ProfileSource';
|
|
6
|
-
import { colorByColors } from './
|
|
6
|
+
import { colorByColors } from './FlameGraphNodes';
|
|
7
7
|
import { CurrentPathFrame } from './utils';
|
|
8
8
|
export declare const FIELD_LABELS_ONLY = "labels_only";
|
|
9
9
|
export declare const FIELD_MAPPING_FILE = "mapping_file";
|
|
@@ -26,7 +26,7 @@ export declare const FIELD_DIFF = "diff";
|
|
|
26
26
|
export declare const FIELD_PARENT = "parent";
|
|
27
27
|
export declare const FIELD_DEPTH = "depth";
|
|
28
28
|
export declare const FIELD_VALUE_OFFSET = "value_offset";
|
|
29
|
-
interface
|
|
29
|
+
interface FlameGraphArrowProps {
|
|
30
30
|
arrow: FlamegraphArrow;
|
|
31
31
|
total: bigint;
|
|
32
32
|
filtered: bigint;
|
|
@@ -38,15 +38,15 @@ interface IcicleGraphArrowProps {
|
|
|
38
38
|
isHalfScreen: boolean;
|
|
39
39
|
mappingsListFromMetadata: string[];
|
|
40
40
|
compareAbsolute: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
isFlameChart?: boolean;
|
|
42
|
+
isRenderedAsFlamegraph?: boolean;
|
|
43
|
+
isInSandwichView?: boolean;
|
|
44
44
|
tooltipId?: string;
|
|
45
45
|
maxFrameCount?: number;
|
|
46
46
|
isExpanded?: boolean;
|
|
47
47
|
}
|
|
48
48
|
export declare const getMappingColors: (mappingsList: string[], isDarkMode: boolean, currentColorProfile: ColorConfig) => colorByColors;
|
|
49
49
|
export declare const getFilenameColors: (filenamesList: string[], isDarkMode: boolean, currentColorProfile: ColorConfig) => colorByColors;
|
|
50
|
-
export declare const
|
|
51
|
-
export default
|
|
50
|
+
export declare const FlameGraphArrow: React.NamedExoticComponent<FlameGraphArrowProps>;
|
|
51
|
+
export default FlameGraphArrow;
|
|
52
52
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,kBAAkB,CAAC;AAE/D,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAuB,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAItE,OAAO,EACL,gBAAgB,EAMjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAC7D,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAC9D,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,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+R1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
package/dist/{ProfileIcicleGraph/IcicleGraphArrow → ProfileFlameGraph/FlameGraphArrow}/index.js
RENAMED
|
@@ -20,7 +20,7 @@ import { getColorForFeature, selectDarkMode, useAppSelector } from '@parca/store
|
|
|
20
20
|
import { getLastItem } from '@parca/utilities';
|
|
21
21
|
import { useProfileViewContext } from '../../ProfileView/context/ProfileViewContext';
|
|
22
22
|
import ContextMenuWrapper from './ContextMenuWrapper';
|
|
23
|
-
import {
|
|
23
|
+
import { FlameNode, RowHeight } from './FlameGraphNodes';
|
|
24
24
|
import { MemoizedTooltip } from './MemoizedTooltip';
|
|
25
25
|
import { TooltipProvider } from './TooltipContext';
|
|
26
26
|
import { useFilenamesList } from './useMappingList';
|
|
@@ -74,7 +74,7 @@ function getMaxDepth(depthColumn) {
|
|
|
74
74
|
}
|
|
75
75
|
return max;
|
|
76
76
|
}
|
|
77
|
-
export const
|
|
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
78
|
const [highlightSimilarStacksPreference] = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key);
|
|
79
79
|
const [hoveringRow, setHoveringRow] = useState(undefined);
|
|
80
80
|
const [dockedMetainfo] = useUserPreference(USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key);
|
|
@@ -94,14 +94,20 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
94
94
|
if (perf?.markInteraction != null) {
|
|
95
95
|
renderStartTime.current = performance.now();
|
|
96
96
|
}
|
|
97
|
-
}, [perf]);
|
|
97
|
+
}, [table, width, curPath, perf]);
|
|
98
98
|
useEffect(() => {
|
|
99
99
|
if (perf?.setMeasurement != null && renderStartTime.current > 0) {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
const measureRenderTime = () => {
|
|
101
|
+
const renderTime = performance.now() - renderStartTime.current;
|
|
102
|
+
if (perf?.setMeasurement != null) {
|
|
103
|
+
perf.setMeasurement('flamegraph.render_time', renderTime);
|
|
104
|
+
}
|
|
105
|
+
if (renderTime > 500 && perf.captureMessage != null) {
|
|
106
|
+
perf.captureMessage(`Slow flamegraph render: ${renderTime.toFixed(0)}ms`, 'warning');
|
|
107
|
+
}
|
|
108
|
+
renderStartTime.current = 0;
|
|
109
|
+
};
|
|
110
|
+
requestAnimationFrame(measureRenderTime);
|
|
105
111
|
}
|
|
106
112
|
}, [table, width, curPath, perf]);
|
|
107
113
|
useEffect(() => {
|
|
@@ -153,7 +159,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
153
159
|
binary: mappingColors,
|
|
154
160
|
};
|
|
155
161
|
const colorByColors = colorByList[colorByValue];
|
|
156
|
-
const MENU_ID = '
|
|
162
|
+
const MENU_ID = 'flame-graph-context-menu';
|
|
157
163
|
const contextMenuRef = useRef(null);
|
|
158
164
|
const { show, hideAll } = useContextMenu({
|
|
159
165
|
id: MENU_ID,
|
|
@@ -200,7 +206,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
200
206
|
const effectiveDepth = maxFrameCount !== undefined && !isExpanded ? Math.min(maxDepth, maxFrameCount) : maxDepth;
|
|
201
207
|
// Use deferred value to prevent UI blocking when expanding frames
|
|
202
208
|
const deferredEffectiveDepth = useDeferredValue(effectiveDepth);
|
|
203
|
-
const height =
|
|
209
|
+
const height = isInSandwichView
|
|
204
210
|
? deferredEffectiveDepth * RowHeight
|
|
205
211
|
: (deferredEffectiveDepth + 1) * RowHeight;
|
|
206
212
|
// To find the selected row, we must walk the current path and look at which
|
|
@@ -227,12 +233,12 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
227
233
|
currentRow = childRows[0];
|
|
228
234
|
}
|
|
229
235
|
const selectedRow = currentRow;
|
|
230
|
-
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,
|
|
231
|
-
if (
|
|
232
|
-
// We don't want to expand in
|
|
236
|
+
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: () => {
|
|
237
|
+
if (isFlameChart) {
|
|
238
|
+
// We don't want to expand in flame charts.
|
|
233
239
|
return;
|
|
234
240
|
}
|
|
235
241
|
handleRowClick(row);
|
|
236
|
-
}, onContextMenu: displayMenu, hoveringRow: highlightSimilarStacksPreference ? hoveringRow : undefined, setHoveringRow: highlightSimilarStacksPreference ? setHoveringRow : noop,
|
|
242
|
+
}, onContextMenu: displayMenu, hoveringRow: highlightSimilarStacksPreference ? hoveringRow : undefined, setHoveringRow: highlightSimilarStacksPreference ? setHoveringRow : noop, isFlameChart: isFlameChart, profileSource: profileSource, isRenderedAsFlamegraph: isRenderedAsFlamegraph, isInSandwichView: isInSandwichView, maxDepth: maxDepth, effectiveDepth: deferredEffectiveDepth, tooltipId: tooltipId }, row))) })] }) }));
|
|
237
243
|
});
|
|
238
|
-
export default
|
|
244
|
+
export default FlameGraphArrow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMappingList.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/useMappingList.ts"],"names":[],"mappings":"AAeA,OAAO,EAAa,KAAK,EAAS,MAAM,cAAc,CAAC;AAOvD,QAAA,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,GAAG,SAAS,KAAG,MAAM,EAsB9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,GAAG,IAAI,KAAG,MAAM,EAyB5D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeColor.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/useNodeColor.ts"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,UAAU,KAAK;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,QAAA,MAAM,YAAY,GAAI,2EAOnB,KAAK,KAAG,MAMV,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAsB,aAAa,EAAC,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAC,SAAS,EAAgB,MAAM,aAAa,CAAC;AAWrD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,MAAM,CAuBzF;AAED,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,aAMhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,eAMzD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,wBAAwB,MAAM,EAC9B,iBAAiB,MAAM,EACvB,OAAO,MAAM,EACb,MAAM,MAAM,KACX,MAOF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,wBAAwB,MAAM,EAC9B,MAAM,MAAM,KACX,MAMF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,KAAG,MAAM,GAAG,IAQpD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,gBAAgB,aAAa,KAAG,SAyBvE,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,KAAG,gBAwBxE,CAAC;AAgBF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,CAAC,EAAE,gBAAgB,GAClB,OAAO,CAWT"}
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { FlamegraphArrow } from '@parca/client';
|
|
3
3
|
import { ProfileType } from '@parca/parser';
|
|
4
4
|
import { MergedProfileSource, ProfileSource } from '../ProfileSource';
|
|
5
|
-
import { CurrentPathFrame } from './
|
|
5
|
+
import { CurrentPathFrame } from './FlameGraphArrow/utils';
|
|
6
6
|
export type ResizeHandler = (width: number, height: number) => void;
|
|
7
|
-
interface
|
|
7
|
+
interface ProfileFlameGraphProps {
|
|
8
8
|
width: number;
|
|
9
9
|
arrow?: FlamegraphArrow;
|
|
10
10
|
total: bigint;
|
|
@@ -19,18 +19,18 @@ interface ProfileIcicleGraphProps {
|
|
|
19
19
|
isHalfScreen: boolean;
|
|
20
20
|
metadataMappingFiles?: string[];
|
|
21
21
|
metadataLoading?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
isFlameChart?: boolean;
|
|
23
|
+
isInSandwichView?: boolean;
|
|
24
|
+
isRenderedAsFlamegraph?: boolean;
|
|
25
25
|
tooltipId?: string;
|
|
26
26
|
maxFrameCount?: number;
|
|
27
27
|
isExpanded?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const validateFlameChartQuery: (profileSource: MergedProfileSource) => {
|
|
30
30
|
isValid: boolean;
|
|
31
31
|
isNonDelta: boolean;
|
|
32
32
|
isDurationTooLong: boolean;
|
|
33
33
|
};
|
|
34
|
-
declare const
|
|
35
|
-
export default
|
|
34
|
+
declare const ProfileFlameGraph: ({ arrow, total, filtered, curPathArrow, setNewCurPathArrow, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isFlameChart, profileSource, isInSandwichView, isRenderedAsFlamegraph, tooltipId, maxFrameCount, isExpanded, }: ProfileFlameGraphProps) => JSX.Element;
|
|
35
|
+
export default ProfileFlameGraph;
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileFlameGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAO9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAC,mBAAmB,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAMpE,OAAO,EAAC,gBAAgB,EAA0B,MAAM,yBAAyB,CAAC;AAIlF,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAUD,eAAO,MAAM,uBAAuB,GAClC,eAAe,mBAAmB,KACjC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAIpE,CAAC;AAEF,QAAA,MAAM,iBAAiB,GAAqC,oPAmBzD,sBAAsB,KAAG,GAAG,CAAC,OA8S/B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -15,40 +15,40 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import cx from 'classnames';
|
|
16
16
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
17
17
|
import { useMeasure } from 'react-use';
|
|
18
|
-
import {
|
|
18
|
+
import { FlameGraphSkeleton, SandwichFlameGraphSkeleton, useParcaContext, useURLState, } from '@parca/components';
|
|
19
19
|
import { capitalizeOnlyFirstLetter, divide } from '@parca/utilities';
|
|
20
20
|
import DiffLegend from '../ProfileView/components/DiffLegend';
|
|
21
21
|
import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
|
|
22
22
|
import { TimelineGuide } from '../TimelineGuide';
|
|
23
|
-
import {
|
|
24
|
-
import useMappingList from './
|
|
25
|
-
import { boundsFromProfileSource } from './
|
|
23
|
+
import { FlameGraphArrow } from './FlameGraphArrow';
|
|
24
|
+
import useMappingList from './FlameGraphArrow/useMappingList';
|
|
25
|
+
import { boundsFromProfileSource } from './FlameGraphArrow/utils';
|
|
26
26
|
const numberFormatter = new Intl.NumberFormat('en-US');
|
|
27
27
|
const ErrorContent = ({ errorMessage }) => {
|
|
28
28
|
return (_jsx("div", { className: "flex flex-col justify-center p-10 text-center gap-6 text-sm", children: errorMessage }));
|
|
29
29
|
};
|
|
30
|
-
export const
|
|
30
|
+
export const validateFlameChartQuery = (profileSource) => {
|
|
31
31
|
const isNonDelta = !profileSource.ProfileType().delta;
|
|
32
32
|
const isDurationTooLong = profileSource.mergeTo - profileSource.mergeFrom > 60000;
|
|
33
33
|
return { isValid: !isNonDelta && !isDurationTooLong, isNonDelta, isDurationTooLong };
|
|
34
34
|
};
|
|
35
|
-
const
|
|
36
|
-
const { onError, authenticationErrorMessage, isDarkMode,
|
|
35
|
+
const ProfileFlameGraph = function ProfileFlameGraphNonMemo({ arrow, total, filtered, curPathArrow, setNewCurPathArrow, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isFlameChart = false, profileSource, isInSandwichView = false, isRenderedAsFlamegraph = false, tooltipId, maxFrameCount, isExpanded = false, }) {
|
|
36
|
+
const { onError, authenticationErrorMessage, isDarkMode, flamechartHelpText } = useParcaContext();
|
|
37
37
|
const { compareMode } = useProfileViewContext();
|
|
38
38
|
const [isLoading, setIsLoading] = useState(true);
|
|
39
|
-
const [
|
|
39
|
+
const [flameChartRef, { height: flameChartHeight }] = useMeasure();
|
|
40
40
|
// Create local state for paths when in sandwich view to avoid URL updates
|
|
41
41
|
const [localCurPathArrow, setLocalCurPathArrow] = useState([]);
|
|
42
42
|
const setCurPathArrowWrapper = useCallback((path) => {
|
|
43
|
-
if (
|
|
43
|
+
if (isInSandwichView) {
|
|
44
44
|
setLocalCurPathArrow(path);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
setNewCurPathArrow(path);
|
|
48
48
|
}
|
|
49
|
-
}, [
|
|
50
|
-
// Determine which paths to use based on
|
|
51
|
-
const effectiveCurPathArrow =
|
|
49
|
+
}, [isInSandwichView, setNewCurPathArrow]);
|
|
50
|
+
// Determine which paths to use based on isInSandwichView flag
|
|
51
|
+
const effectiveCurPathArrow = isInSandwichView ? localCurPathArrow : curPathArrow;
|
|
52
52
|
const mappingsList = useMappingList(metadataMappingFiles);
|
|
53
53
|
const [colorBy, setColorBy] = useURLState('color_by');
|
|
54
54
|
// By default, we want delta profiles (CPU) to be relatively compared.
|
|
@@ -91,24 +91,24 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
|
|
|
91
91
|
setIsLoading(true);
|
|
92
92
|
}
|
|
93
93
|
}, [loadingState]);
|
|
94
|
-
const
|
|
95
|
-
const { isValid:
|
|
96
|
-
?
|
|
94
|
+
const flameGraph = useMemo(() => {
|
|
95
|
+
const { isValid: isFlameChartValid, isNonDelta, isDurationTooLong, } = isFlameChart
|
|
96
|
+
? validateFlameChartQuery(profileSource)
|
|
97
97
|
: { isValid: true, isNonDelta: false, isDurationTooLong: false };
|
|
98
|
-
const
|
|
99
|
-
if (isLoading && !
|
|
100
|
-
return (_jsx("div", { className: "h-auto overflow-clip", children:
|
|
98
|
+
const isInvalidFlameChartQuery = isFlameChart && !isFlameChartValid;
|
|
99
|
+
if (isLoading && !isInvalidFlameChartQuery) {
|
|
100
|
+
return (_jsx("div", { className: "h-auto overflow-clip", children: isRenderedAsFlamegraph ? (_jsx(SandwichFlameGraphSkeleton, { isHalfScreen: isHalfScreen, isDarkMode: isDarkMode })) : (_jsx(FlameGraphSkeleton, { isHalfScreen: isHalfScreen, isDarkMode: isDarkMode })) }));
|
|
101
101
|
}
|
|
102
|
-
// Do necessary checks to ensure that
|
|
103
|
-
if (
|
|
102
|
+
// Do necessary checks to ensure that flame chart can be rendered for this query.
|
|
103
|
+
if (isInvalidFlameChartQuery) {
|
|
104
104
|
if (isNonDelta) {
|
|
105
|
-
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "To use the
|
|
105
|
+
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "To use the Flame chart, please switch to a Delta profile." }), flamechartHelpText ?? null] }) }));
|
|
106
106
|
}
|
|
107
107
|
else if (isDurationTooLong) {
|
|
108
|
-
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "
|
|
108
|
+
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "Flame chart is unavailable for queries longer than one minute. Please select a point in the metrics graph to continue." }), flamechartHelpText ?? null] }) }));
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
|
-
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "The
|
|
111
|
+
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: "The Flame chart is not available for this query." }), flamechartHelpText ?? null] }) }));
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
if (arrow === undefined)
|
|
@@ -116,7 +116,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
|
|
|
116
116
|
if (total === 0n && !loading)
|
|
117
117
|
return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
|
|
118
118
|
if (arrow !== undefined) {
|
|
119
|
-
return (_jsxs("div", { className: "relative", children: [
|
|
119
|
+
return (_jsxs("div", { className: "relative", children: [isFlameChart ? (_jsx(TimelineGuide, { bounds: boundsFromProfileSource(profileSource), width: width, height: flameChartHeight ?? 420, margin: 0, ticks: 12, timeUnit: "nanoseconds" })) : null, _jsx("div", { ref: flameChartRef, children: _jsx(FlameGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: effectiveCurPathArrow, setCurPath: setCurPathArrowWrapper, profileType: profileType, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute, isFlameChart: isFlameChart, profileSource: profileSource, isRenderedAsFlamegraph: isRenderedAsFlamegraph, isInSandwichView: isInSandwichView, tooltipId: tooltipId, maxFrameCount: maxFrameCount, isExpanded: isExpanded }) })] }));
|
|
120
120
|
}
|
|
121
121
|
}, [
|
|
122
122
|
isLoading,
|
|
@@ -130,13 +130,13 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
|
|
|
130
130
|
isDarkMode,
|
|
131
131
|
mappingsList,
|
|
132
132
|
isCompareAbsolute,
|
|
133
|
-
|
|
133
|
+
isFlameChart,
|
|
134
134
|
profileSource,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
flameChartHeight,
|
|
136
|
+
flameChartRef,
|
|
137
|
+
flamechartHelpText,
|
|
138
|
+
isRenderedAsFlamegraph,
|
|
139
|
+
isInSandwichView,
|
|
140
140
|
effectiveCurPathArrow,
|
|
141
141
|
setCurPathArrowWrapper,
|
|
142
142
|
tooltipId,
|
|
@@ -160,8 +160,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
|
|
|
160
160
|
if (isMergeError || isTimestampError) {
|
|
161
161
|
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { className: "font-semibold", children: "Unable to display overlapping data" }), _jsx("span", { className: "text-gray-600 dark:text-gray-400", children: "The selected data contains overlapping samples from multiple nodes or threads that cannot be merged." }), _jsx("span", { className: "text-gray-600 dark:text-gray-400", children: "To view this data, please apply more specific filters:" }), _jsxs("ul", { className: "list-disc list-inside text-left max-w-md mx-auto text-gray-600 dark:text-gray-400", children: [_jsx("li", { children: "Select a specific node from the node selector" }), _jsx("li", { children: "Filter by either CPU or thread" })] })] }) }));
|
|
162
162
|
}
|
|
163
|
-
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: capitalizeOnlyFirstLetter(error.message) }),
|
|
163
|
+
return (_jsx(ErrorContent, { errorMessage: _jsxs(_Fragment, { children: [_jsx("span", { children: capitalizeOnlyFirstLetter(error.message) }), isFlameChart ? flamechartHelpText ?? null : null] }) }));
|
|
164
164
|
}
|
|
165
|
-
return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "relative h-full w-full", initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.5 }, children: [compareMode ? _jsx(DiffLegend, {}) : null, _jsx("div", { className: cx(!
|
|
165
|
+
return (_jsx(AnimatePresence, { children: _jsxs(motion.div, { className: "relative h-full w-full", initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.5 }, children: [compareMode ? _jsx(DiffLegend, {}) : null, _jsx("div", { className: cx(!isInSandwichView ? 'min-h-48' : ''), id: "h-flame-graph", children: _jsx(_Fragment, { children: flameGraph }) }), !isInSandwichView && (_jsxs("p", { className: "my-2 text-xs", children: ["Showing ", totalFormatted, ' ', isFiltered ? (_jsxs("span", { children: ["(", filteredPercentage, "%) filtered of ", totalUnfilteredFormatted, ' '] })) : (_jsx(_Fragment, {})), "values.", ' '] }))] }, "flame-graph-loaded") }));
|
|
166
166
|
};
|
|
167
|
-
export default
|
|
167
|
+
export default ProfileFlameGraph;
|
|
@@ -62,7 +62,7 @@ export const useAutoQuerySelector = ({ selectedProfileName, profileTypesData, se
|
|
|
62
62
|
void navigateTo('/', {
|
|
63
63
|
...compareQuery,
|
|
64
64
|
search_string: '',
|
|
65
|
-
dashboard_items: ['
|
|
65
|
+
dashboard_items: ['flamegraph'],
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
}, [comparing, querySelection, navigateTo, expressionA, dispatch, loading]);
|
|
@@ -12,7 +12,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { Select, useURLState } from '@parca/components';
|
|
15
|
-
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_NAME, } from '../../../
|
|
15
|
+
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_NAME, } from '../../../ProfileFlameGraph/FlameGraphArrow';
|
|
16
16
|
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
17
17
|
const SortByDropdown = () => {
|
|
18
18
|
const [storeSortBy, setStoreSortBy] = useURLState('sort_by', {
|
|
@@ -17,8 +17,8 @@ import cx from 'classnames';
|
|
|
17
17
|
import { useURLState } from '@parca/components';
|
|
18
18
|
import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
|
|
19
19
|
import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
|
|
20
|
-
import { getMappingColors } from '../../
|
|
21
|
-
import useMappingList from '../../
|
|
20
|
+
import { getMappingColors } from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
21
|
+
import useMappingList from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
|
|
22
22
|
const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
|
|
23
23
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
24
24
|
const currentColorProfile = useCurrentColorProfile();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProfilerOnRenderCallback } from 'react';
|
|
2
2
|
import { QueryServiceClient } from '@parca/client';
|
|
3
|
-
import { CurrentPathFrame } from '../../../
|
|
3
|
+
import { CurrentPathFrame } from '../../../ProfileFlameGraph/FlameGraphArrow/utils';
|
|
4
4
|
import { ProfileSource } from '../../../ProfileSource';
|
|
5
5
|
import type { FlamegraphData, SourceData, TopTableData, VisualizationType } from '../../types/visualization';
|
|
6
6
|
interface GetDashboardItemProps {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;IACF,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,eAAO,MAAM,gBAAgB,GAAI,0NAiB9B,qBAAqB,KAAG,GAAG,CAAC,OA2G9B,CAAC"}
|