@parca/profile 0.16.490 → 0.16.492
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/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts +3 -2
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts +7 -6
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js +5 -4
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +3 -2
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.d.ts +10 -0
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/utils.js +27 -1
- package/dist/ProfileIcicleGraph/index.d.ts +4 -1
- package/dist/ProfileIcicleGraph/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/index.js +4 -2
- package/dist/ProfileTypeSelector/index.d.ts.map +1 -1
- package/dist/ProfileTypeSelector/index.js +5 -1
- package/dist/ProfileView/components/DashboardItems/index.d.ts +4 -1
- package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
- package/dist/ProfileView/components/DashboardItems/index.js +3 -3
- package/dist/ProfileView/components/Toolbars/index.d.ts +5 -4
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -0
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +8 -1
- package/dist/ProfileView/index.d.ts.map +1 -1
- package/dist/ProfileView/index.js +5 -3
- package/package.json +3 -3
- package/src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx +3 -2
- package/src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx +18 -10
- package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +3 -3
- package/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts +51 -0
- package/src/ProfileIcicleGraph/index.tsx +9 -3
- package/src/ProfileTypeSelector/index.tsx +5 -1
- package/src/ProfileView/components/DashboardItems/index.tsx +10 -1
- package/src/ProfileView/components/Toolbars/index.tsx +5 -4
- package/src/ProfileView/hooks/useVisualizationState.ts +11 -1
- package/src/ProfileView/index.tsx +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.16.492](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.491...@parca/profile@0.16.492) (2025-04-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.16.491](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.490...@parca/profile@0.16.491) (2025-04-08)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.490](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.489...@parca/profile@0.16.490) (2025-04-08)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Table } from 'apache-arrow';
|
|
2
2
|
import { ProfileType } from '@parca/parser';
|
|
3
|
+
import { CurrentPathFrame } from './utils';
|
|
3
4
|
interface ContextMenuProps {
|
|
4
5
|
menuId: string;
|
|
5
6
|
table: Table<any>;
|
|
@@ -11,8 +12,8 @@ interface ContextMenuProps {
|
|
|
11
12
|
level: number;
|
|
12
13
|
compareAbsolute: boolean;
|
|
13
14
|
trackVisibility: (isVisible: boolean) => void;
|
|
14
|
-
curPath:
|
|
15
|
-
setCurPath: (path:
|
|
15
|
+
curPath: CurrentPathFrame[];
|
|
16
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
16
17
|
hideMenu: () => void;
|
|
17
18
|
hideBinary: (binaryToRemove: string) => void;
|
|
18
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAM1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAEzC,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,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,WAAW,2JAed,gBAAgB,KAAG,GAAG,CAAC,OA0LzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Table } from 'apache-arrow';
|
|
3
3
|
import 'react-contexify/dist/ReactContexify.css';
|
|
4
4
|
import { ProfileType } from '@parca/parser';
|
|
5
|
+
import { CurrentPathFrame } from './utils';
|
|
5
6
|
export declare const RowHeight = 26;
|
|
6
7
|
interface IcicleGraphNodesProps {
|
|
7
8
|
table: Table<any>;
|
|
@@ -14,11 +15,11 @@ interface IcicleGraphNodesProps {
|
|
|
14
15
|
total: bigint;
|
|
15
16
|
totalWidth: number;
|
|
16
17
|
level: number;
|
|
17
|
-
curPath:
|
|
18
|
-
setCurPath: (path:
|
|
18
|
+
curPath: CurrentPathFrame[];
|
|
19
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
19
20
|
setHoveringRow: (row: number | null) => void;
|
|
20
21
|
setHoveringLevel: (level: number | null) => void;
|
|
21
|
-
path:
|
|
22
|
+
path: CurrentPathFrame[];
|
|
22
23
|
xScale: (value: bigint) => number;
|
|
23
24
|
searchString?: string;
|
|
24
25
|
sortBy: string;
|
|
@@ -41,15 +42,15 @@ export interface IcicleNodeProps {
|
|
|
41
42
|
y: number;
|
|
42
43
|
height: number;
|
|
43
44
|
totalWidth: number;
|
|
44
|
-
curPath:
|
|
45
|
+
curPath: CurrentPathFrame[];
|
|
45
46
|
level: number;
|
|
46
47
|
table: Table<any>;
|
|
47
48
|
row: number;
|
|
48
49
|
colors: colorByColors;
|
|
49
50
|
colorBy: string;
|
|
50
|
-
path:
|
|
51
|
+
path: CurrentPathFrame[];
|
|
51
52
|
total: bigint;
|
|
52
|
-
setCurPath: (path:
|
|
53
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
53
54
|
setHoveringRow: (row: number | null) => void;
|
|
54
55
|
setHoveringLevel: (level: number | null) => void;
|
|
55
56
|
xScale: (value: bigint) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IcicleGraphNodes.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"IcicleGraphNodes.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAY1C,OAAO,EACL,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,EAAE,CAA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IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gCAAgC,EAAE,OAAO,CAAC;CAC3C;AAED,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AACF,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,UAAU,6CAsQrB,CAAC"}
|
|
@@ -19,7 +19,7 @@ import 'react-contexify/dist/ReactContexify.css';
|
|
|
19
19
|
import TextWithEllipsis from './TextWithEllipsis';
|
|
20
20
|
import { FIELD_CHILDREN, FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_NAME, FIELD_MAPPING_FILE, } from './index';
|
|
21
21
|
import useNodeColor from './useNodeColor';
|
|
22
|
-
import { arrowToString, nodeLabel } from './utils';
|
|
22
|
+
import { arrowToString, getCurrentPathFrameData, isCurrentPathFrameMatch, nodeLabel, } from './utils';
|
|
23
23
|
export const RowHeight = 26;
|
|
24
24
|
export const IcicleGraphNodes = React.memo(function IcicleGraphNodesNoMemo({ table, childRows, colors, colorBy, x, y, xScale, total, totalWidth, level, path, setCurPath, setHoveringRow, setHoveringLevel, curPath, sortBy, searchString, darkMode, compareMode, profileType, isContextMenuOpen, hoveringName, setHoveringName, hoveringRow, colorForSimilarNodes, highlightSimilarStacksPreference, }) {
|
|
25
25
|
const cumulatives = table.getChild(FIELD_CUMULATIVE);
|
|
@@ -29,7 +29,7 @@ export const IcicleGraphNodes = React.memo(function IcicleGraphNodesNoMemo({ tab
|
|
|
29
29
|
childRows =
|
|
30
30
|
curPath.length === 0
|
|
31
31
|
? childRows
|
|
32
|
-
: childRows.filter(c =>
|
|
32
|
+
: childRows.filter(c => isCurrentPathFrameMatch(table, c, level, curPath[0]));
|
|
33
33
|
let childrenCumulative = BigInt(0);
|
|
34
34
|
const childrenElements = [];
|
|
35
35
|
childRows.forEach((child, i) => {
|
|
@@ -155,8 +155,9 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
|
|
|
155
155
|
const name = useMemo(() => {
|
|
156
156
|
return isRoot ? 'root' : nodeLabel(table, row, level, binaries.length > 1);
|
|
157
157
|
}, [table, row, level, isRoot, binaries]);
|
|
158
|
-
const
|
|
159
|
-
const
|
|
158
|
+
const currentPathFrame = getCurrentPathFrameData(table, row, level);
|
|
159
|
+
const nextPath = path.concat([currentPathFrame]);
|
|
160
|
+
const isFaded = curPath.length > 0 && !isCurrentPathFrameMatch(table, row, level, curPath[curPath.length - 1]);
|
|
160
161
|
const styles = isFaded ? fadedIcicleRectStyles : icicleRectStyles;
|
|
161
162
|
const nextLevel = level + 1;
|
|
162
163
|
const nextCurPath = curPath.length === 0 ? [] : curPath.slice(1);
|
|
@@ -4,6 +4,7 @@ import { ProfileType } from '@parca/parser';
|
|
|
4
4
|
import { type ColorConfig } from '@parca/utilities';
|
|
5
5
|
import { ProfileSource } from '../../ProfileSource';
|
|
6
6
|
import { colorByColors } from './IcicleGraphNodes';
|
|
7
|
+
import { CurrentPathFrame } from './utils';
|
|
7
8
|
export declare const FIELD_LABELS_ONLY = "labels_only";
|
|
8
9
|
export declare const FIELD_MAPPING_FILE = "mapping_file";
|
|
9
10
|
export declare const FIELD_MAPPING_BUILD_ID = "mapping_build_id";
|
|
@@ -29,8 +30,8 @@ interface IcicleGraphArrowProps {
|
|
|
29
30
|
profileType?: ProfileType;
|
|
30
31
|
profileSource?: ProfileSource;
|
|
31
32
|
width?: number;
|
|
32
|
-
curPath:
|
|
33
|
-
setCurPath: (path:
|
|
33
|
+
curPath: CurrentPathFrame[];
|
|
34
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
34
35
|
sortBy: string;
|
|
35
36
|
flamegraphLoading: boolean;
|
|
36
37
|
isHalfScreen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAQ1C,OAAO,EAA2B,KAAK,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAK5E,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAIlD,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAQ1C,OAAO,EAA2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AC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,iBACb,MAAM,EAAE,cACV,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,cACX,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAIF,eAAO,MAAM,gBAAgB,mDAqU3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,4 +9,14 @@ export declare const getTextForCumulative: (hoveringNodeCumulative: bigint, tota
|
|
|
9
9
|
export declare const getTextForCumulativePerSecond: (hoveringNodeCumulative: number, unit: string) => string;
|
|
10
10
|
export declare const arrowToString: (buffer: any) => string | null;
|
|
11
11
|
export declare const boundsFromProfileSource: (profileSource?: ProfileSource) => BigIntDuo;
|
|
12
|
+
export interface CurrentPathFrame {
|
|
13
|
+
functionName: string;
|
|
14
|
+
systemName: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
lineNumber: number;
|
|
17
|
+
address: string;
|
|
18
|
+
inlined: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const getCurrentPathFrameData: (table: Table<any>, row: number, _level: number) => CurrentPathFrame;
|
|
21
|
+
export declare function isCurrentPathFrameMatch(table: Table<any>, row: number, level: number, b: CurrentPathFrame): boolean;
|
|
12
22
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAIL,KAAK,aAAa,E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C;CAClB;AAED,eAAO,MAAM,uBAAuB,UAC3B,KAAK,CAAC,GAAG,CAAC,OACZ,MAAM,UACH,MAAM,KACb,gBAiBF,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,gBAAgB,GAClB,OAAO,CAUT"}
|
|
@@ -14,7 +14,7 @@ import { BINARY_FEATURE_TYPES, EVERYTHING_ELSE, FILENAMES_FEATURE_TYPES, } from
|
|
|
14
14
|
import { divide, getLastItem, valueFormatter } from '@parca/utilities';
|
|
15
15
|
import { MergedProfileSource } from '../../ProfileSource';
|
|
16
16
|
import { hexifyAddress } from '../../utils';
|
|
17
|
-
import { FIELD_FUNCTION_NAME, FIELD_LABELS_ONLY, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE, } from './index';
|
|
17
|
+
import { FIELD_FUNCTION_NAME, FIELD_FUNCTION_START_LINE, FIELD_INLINED, FIELD_LABELS_ONLY, FIELD_LOCATION_ADDRESS, FIELD_MAPPING_FILE, } from './index';
|
|
18
18
|
export function nodeLabel(table, row, level, showBinaryName) {
|
|
19
19
|
const labelsOnly = table.getChild(FIELD_LABELS_ONLY)?.get(row);
|
|
20
20
|
if (level === 1 && labelsOnly !== null && labelsOnly) {
|
|
@@ -93,3 +93,29 @@ export const boundsFromProfileSource = (profileSource) => {
|
|
|
93
93
|
const end = request.options.merge.end.seconds * 1000000000n + BigInt(request.options.merge.end.nanos);
|
|
94
94
|
return [start, end];
|
|
95
95
|
};
|
|
96
|
+
export const getCurrentPathFrameData = (table, row, _level) => {
|
|
97
|
+
const functionName = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
|
|
98
|
+
const systemName = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
|
|
99
|
+
const fileName = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
|
|
100
|
+
const lineNumber = table.getChild(FIELD_FUNCTION_START_LINE)?.get(row) ?? 0n;
|
|
101
|
+
const addressBigInt = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row);
|
|
102
|
+
const address = hexifyAddress(addressBigInt);
|
|
103
|
+
const inlined = table.getChild(FIELD_INLINED)?.get(row);
|
|
104
|
+
return {
|
|
105
|
+
functionName: functionName ?? '',
|
|
106
|
+
systemName: systemName ?? '',
|
|
107
|
+
fileName: fileName ?? '',
|
|
108
|
+
lineNumber: Number(lineNumber),
|
|
109
|
+
address: address,
|
|
110
|
+
inlined: inlined ?? false,
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export function isCurrentPathFrameMatch(table, row, level, b) {
|
|
114
|
+
const a = getCurrentPathFrameData(table, row, level);
|
|
115
|
+
return (a.functionName === b.functionName &&
|
|
116
|
+
a.systemName === b.systemName &&
|
|
117
|
+
a.fileName === b.fileName &&
|
|
118
|
+
a.lineNumber === b.lineNumber &&
|
|
119
|
+
a.address === b.address &&
|
|
120
|
+
a.inlined === b.inlined);
|
|
121
|
+
}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Flamegraph, FlamegraphArrow } from '@parca/client';
|
|
3
3
|
import { ProfileType } from '@parca/parser';
|
|
4
4
|
import { ProfileSource } from '../ProfileSource';
|
|
5
|
+
import { CurrentPathFrame } from './IcicleGraphArrow/utils';
|
|
5
6
|
export type ResizeHandler = (width: number, height: number) => void;
|
|
6
7
|
interface ProfileIcicleGraphProps {
|
|
7
8
|
width: number;
|
|
@@ -13,6 +14,8 @@ interface ProfileIcicleGraphProps {
|
|
|
13
14
|
profileSource?: ProfileSource;
|
|
14
15
|
curPath: string[] | [];
|
|
15
16
|
setNewCurPath: (path: string[]) => void;
|
|
17
|
+
curPathArrow: CurrentPathFrame[] | [];
|
|
18
|
+
setNewCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
16
19
|
loading: boolean;
|
|
17
20
|
setActionButtons?: (buttons: React.JSX.Element) => void;
|
|
18
21
|
error?: any;
|
|
@@ -21,6 +24,6 @@ interface ProfileIcicleGraphProps {
|
|
|
21
24
|
metadataLoading?: boolean;
|
|
22
25
|
isIcicleChart?: boolean;
|
|
23
26
|
}
|
|
24
|
-
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isIcicleChart, profileSource, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
27
|
+
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, curPathArrow, setNewCurPathArrow, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isIcicleChart, profileSource, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
25
28
|
export default ProfileIcicleGraph;
|
|
26
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAKrE,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAKrE,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAO/C,OAAO,EAAC,gBAAgB,EAA0B,MAAM,0BAA0B,CAAC;AAInF,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,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,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAMD,QAAA,MAAM,kBAAkB,uMAiBrB,uBAAuB,KAAG,GAAG,CAAC,OAuMhC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -27,7 +27,7 @@ const numberFormatter = new Intl.NumberFormat('en-US');
|
|
|
27
27
|
const ErrorContent = ({ errorMessage }) => {
|
|
28
28
|
return _jsx("div", { className: "flex justify-center p-10", children: errorMessage });
|
|
29
29
|
};
|
|
30
|
-
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isIcicleChart = false, profileSource, }) {
|
|
30
|
+
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, curPathArrow, setNewCurPathArrow, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, isIcicleChart = false, profileSource, }) {
|
|
31
31
|
const { onError, authenticationErrorMessage, isDarkMode } = useParcaContext();
|
|
32
32
|
const { compareMode } = useProfileViewContext();
|
|
33
33
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -86,7 +86,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
86
86
|
if (graph !== undefined)
|
|
87
87
|
return (_jsx(IcicleGraph, { width: width, graph: graph, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType }));
|
|
88
88
|
if (arrow !== undefined) {
|
|
89
|
-
return (_jsxs("div", { className: "relative", children: [isIcicleChart ? (_jsx(TimelineGuide, { bounds: boundsFromProfileSource(profileSource), width: width, height: icicleChartHeight ?? 420, margin: 0, ticks: 12, timeUnit: "nanoseconds" })) : null, _jsx("div", { ref: icicleChartRef, children: _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath:
|
|
89
|
+
return (_jsxs("div", { className: "relative", children: [isIcicleChart ? (_jsx(TimelineGuide, { bounds: boundsFromProfileSource(profileSource), width: width, height: icicleChartHeight ?? 420, margin: 0, ticks: 12, timeUnit: "nanoseconds" })) : null, _jsx("div", { ref: icicleChartRef, children: _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPathArrow, setCurPath: setNewCurPathArrow, profileType: profileType, sortBy: storeSortBy, flamegraphLoading: isLoading, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute, isIcicleChart: isIcicleChart, profileSource: profileSource }) })] }));
|
|
90
90
|
}
|
|
91
91
|
}, [
|
|
92
92
|
isLoading,
|
|
@@ -98,6 +98,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
98
98
|
filtered,
|
|
99
99
|
curPath,
|
|
100
100
|
setNewCurPath,
|
|
101
|
+
curPathArrow,
|
|
102
|
+
setNewCurPathArrow,
|
|
101
103
|
profileType,
|
|
102
104
|
storeSortBy,
|
|
103
105
|
isHalfScreen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileTypeSelector/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAC,WAAW,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAE7D,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileTypeSelector/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAC,WAAW,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAE7D,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBA6E/B,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAU3F;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,8BAA8B,EAAE,OAAO,GACtC,aAAa,CAiBf;AAED,eAAO,MAAM,oBAAoB,SAAU,WAAW,KAAG,MAIxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAAW,WAAW,EAAE,KAAG,MAAM,EAItE,CAAC;AAEF,UAAU,KAAK;IACb,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,8GAQtB,KAAK,KAAG,GAAG,CAAC,OAyBd,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -84,7 +84,11 @@ export const wellKnownProfiles = {
|
|
|
84
84
|
},
|
|
85
85
|
'parca_agent:samples:count:cpu:nanoseconds:delta': {
|
|
86
86
|
name: 'On-CPU',
|
|
87
|
-
help: 'On CPU profile samples observed by the Parca Agent.',
|
|
87
|
+
help: 'On CPU profile samples as observed by the Parca Agent.',
|
|
88
|
+
},
|
|
89
|
+
'parca_agent:wallclock:nanoseconds:samples:count:delta': {
|
|
90
|
+
name: 'Off-CPU',
|
|
91
|
+
help: 'Time spent off the CPU as observed by the Parca Agent.',
|
|
88
92
|
},
|
|
89
93
|
};
|
|
90
94
|
export function flexibleWellKnownProfileMatching(name) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProfilerOnRenderCallback } from 'react';
|
|
2
|
+
import { CurrentPathFrame } from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
2
3
|
import { ProfileSource } from '../../../ProfileSource';
|
|
3
4
|
import type { CallgraphData, FlamegraphData, SourceData, TopTableData, VisualizationType } from '../../types/visualization';
|
|
4
5
|
interface GetDashboardItemProps {
|
|
@@ -15,6 +16,8 @@ interface GetDashboardItemProps {
|
|
|
15
16
|
filtered: bigint;
|
|
16
17
|
curPath: string[];
|
|
17
18
|
setNewCurPath: (path: string[]) => void;
|
|
19
|
+
curPathArrow: CurrentPathFrame[];
|
|
20
|
+
setNewCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
18
21
|
currentSearchString?: string;
|
|
19
22
|
setSearchString?: (value: string) => void;
|
|
20
23
|
callgraphSVG?: string;
|
|
@@ -22,6 +25,6 @@ interface GetDashboardItemProps {
|
|
|
22
25
|
onRender?: ProfilerOnRenderCallback;
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
|
-
export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, }: GetDashboardItemProps) => JSX.Element;
|
|
28
|
+
export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, curPathArrow, setNewCurPathArrow, currentSearchString, setSearchString, callgraphSVG, perf, }: GetDashboardItemProps) => JSX.Element;
|
|
26
29
|
export {};
|
|
27
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;AAMzD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2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,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,wBAAwB,CAAC;KACrC,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,qQAoB1B,qBAAqB,KAAG,GAAG,CAAC,OA4G9B,CAAC"}
|
|
@@ -17,19 +17,19 @@ import Callgraph from '../../../Callgraph';
|
|
|
17
17
|
import ProfileIcicleGraph from '../../../ProfileIcicleGraph';
|
|
18
18
|
import { SourceView } from '../../../SourceView';
|
|
19
19
|
import { Table } from '../../../Table';
|
|
20
|
-
export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, }) => {
|
|
20
|
+
export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, flamechartData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, curPathArrow, setNewCurPathArrow, currentSearchString, setSearchString, callgraphSVG, perf, }) => {
|
|
21
21
|
switch (type) {
|
|
22
22
|
case 'icicle':
|
|
23
23
|
return (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
|
|
24
24
|
id: 'icicleGraph',
|
|
25
25
|
onRender: perf?.onRender ?? (() => { }),
|
|
26
|
-
}, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, arrow: flamegraphData?.arrow, graph: flamegraphData?.data, total: total, filtered: filtered, profileType: profileSource?.ProfileType(), loading: flamegraphData.loading, error: flamegraphData.error, isHalfScreen: isHalfScreen, width: dimensions?.width !== undefined
|
|
26
|
+
}, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, curPathArrow: curPathArrow, setNewCurPathArrow: setNewCurPathArrow, arrow: flamegraphData?.arrow, graph: flamegraphData?.data, total: total, filtered: filtered, profileType: profileSource?.ProfileType(), loading: flamegraphData.loading, error: flamegraphData.error, isHalfScreen: isHalfScreen, width: dimensions?.width !== undefined
|
|
27
27
|
? isHalfScreen
|
|
28
28
|
? (dimensions.width - 54) / 2
|
|
29
29
|
: dimensions.width - 16
|
|
30
30
|
: 0, metadataMappingFiles: flamegraphData.metadataMappingFiles, metadataLoading: flamegraphData.metadataLoading }) }));
|
|
31
31
|
case 'iciclechart':
|
|
32
|
-
return (_jsx(ProfileIcicleGraph, { curPath:
|
|
32
|
+
return (_jsx(ProfileIcicleGraph, { curPath: [], setNewCurPath: () => { }, curPathArrow: [], setNewCurPathArrow: () => { }, arrow: flamechartData?.arrow, total: total, filtered: filtered, profileType: profileSource?.ProfileType(), loading: flamechartData.loading, error: flamechartData.error, isHalfScreen: isHalfScreen, width: dimensions?.width !== undefined
|
|
33
33
|
? isHalfScreen
|
|
34
34
|
? (dimensions.width - 54) / 2
|
|
35
35
|
: dimensions.width - 16
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { QueryServiceClient } from '@parca/client';
|
|
3
3
|
import { ProfileType } from '@parca/parser';
|
|
4
|
+
import { CurrentPathFrame } from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
4
5
|
import { ProfileSource } from '../../../ProfileSource';
|
|
5
6
|
export interface VisualisationToolbarProps {
|
|
6
7
|
groupBy: string[];
|
|
@@ -10,8 +11,8 @@ export interface VisualisationToolbarProps {
|
|
|
10
11
|
profileSource?: ProfileSource;
|
|
11
12
|
queryClient?: QueryServiceClient;
|
|
12
13
|
onDownloadPProf: () => void;
|
|
13
|
-
curPath:
|
|
14
|
-
setNewCurPath: (path:
|
|
14
|
+
curPath: CurrentPathFrame[];
|
|
15
|
+
setNewCurPath: (path: CurrentPathFrame[]) => void;
|
|
15
16
|
profileType?: ProfileType;
|
|
16
17
|
total: bigint;
|
|
17
18
|
filtered: bigint;
|
|
@@ -32,8 +33,8 @@ export interface TableToolbarProps {
|
|
|
32
33
|
currentSearchString?: string;
|
|
33
34
|
}
|
|
34
35
|
export interface IcicleGraphToolbarProps {
|
|
35
|
-
curPath:
|
|
36
|
-
setNewCurPath: (path:
|
|
36
|
+
curPath: CurrentPathFrame[];
|
|
37
|
+
setNewCurPath: (path: CurrentPathFrame[]) => void;
|
|
37
38
|
}
|
|
38
39
|
export declare const TableToolbar: FC<TableToolbarProps>;
|
|
39
40
|
export declare const IcicleGraphToolbar: FC<IcicleGraphToolbarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAUrD,MAAM,WAAW,yBAAyB;IAC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,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6BAA6B,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAuB9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiB1D,CAAC;AAMF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6E9D,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { CurrentPathFrame } from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
1
2
|
export declare const useVisualizationState: () => {
|
|
2
3
|
curPath: string[];
|
|
3
4
|
setCurPath: (path: string[]) => void;
|
|
5
|
+
curPathArrow: CurrentPathFrame[];
|
|
6
|
+
setCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
4
7
|
currentSearchString: string | undefined;
|
|
5
8
|
setSearchString: (searchString: string | undefined) => void;
|
|
6
9
|
colorStackLegend: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iDAAiD,CAAC;AAEjF,eAAO,MAAM,qBAAqB,QAAO;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACpD,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CA0D9C,CAAC"}
|
|
@@ -11,10 +11,15 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { useCallback, useState } from 'react';
|
|
14
|
-
import { useURLState } from '@parca/components';
|
|
14
|
+
import { JSONParser, JSONSerializer, useURLState, useURLStateCustom } from '@parca/components';
|
|
15
15
|
import { FIELD_FUNCTION_NAME, FIELD_LABELS } from '../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
16
16
|
export const useVisualizationState = () => {
|
|
17
17
|
const [curPath, setCurPath] = useState([]);
|
|
18
|
+
const [curPathArrow, setCurPathArrow] = useURLStateCustom('cur_path', {
|
|
19
|
+
parse: (JSONParser),
|
|
20
|
+
stringify: JSONSerializer,
|
|
21
|
+
defaultValue: '[]',
|
|
22
|
+
});
|
|
18
23
|
const [currentSearchString, setSearchString] = useURLState('search_string');
|
|
19
24
|
const [colorStackLegend] = useURLState('color_stack_legend');
|
|
20
25
|
const [colorBy] = useURLState('color_by');
|
|
@@ -39,6 +44,8 @@ export const useVisualizationState = () => {
|
|
|
39
44
|
return {
|
|
40
45
|
curPath,
|
|
41
46
|
setCurPath,
|
|
47
|
+
curPathArrow,
|
|
48
|
+
setCurPathArrow,
|
|
42
49
|
currentSearchString,
|
|
43
50
|
setSearchString,
|
|
44
51
|
colorStackLegend,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileView/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAG/E,eAAO,MAAM,WAAW,qMAcrB,gBAAgB,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileView/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAC,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAG/E,eAAO,MAAM,WAAW,qMAcrB,gBAAgB,KAAG,GAAG,CAAC,OA4IzB,CAAC"}
|
|
@@ -31,7 +31,7 @@ export const ProfileView = ({ total, filtered, flamegraphData, flamechartData, t
|
|
|
31
31
|
const { ref, dimensions } = useContainerDimensions();
|
|
32
32
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
33
33
|
const colorRange = getColorRange(isDarkMode);
|
|
34
|
-
const { curPath, setCurPath, currentSearchString, setSearchString, colorStackLegend, colorBy, groupBy, toggleGroupBy, clearSelection, setGroupByLabels, } = useVisualizationState();
|
|
34
|
+
const { curPath, setCurPath, curPathArrow, setCurPathArrow, currentSearchString, setSearchString, colorStackLegend, colorBy, groupBy, toggleGroupBy, clearSelection, setGroupByLabels, } = useVisualizationState();
|
|
35
35
|
const { callgraphSVG } = useGraphviz({
|
|
36
36
|
callgraphData: callgraphData?.data,
|
|
37
37
|
width: dimensions?.width,
|
|
@@ -61,6 +61,8 @@ export const ProfileView = ({ total, filtered, flamegraphData, flamechartData, t
|
|
|
61
61
|
filtered,
|
|
62
62
|
curPath,
|
|
63
63
|
setNewCurPath: setCurPath,
|
|
64
|
+
curPathArrow,
|
|
65
|
+
setNewCurPathArrow: setCurPathArrow,
|
|
64
66
|
currentSearchString,
|
|
65
67
|
setSearchString,
|
|
66
68
|
callgraphSVG,
|
|
@@ -68,9 +70,9 @@ export const ProfileView = ({ total, filtered, flamegraphData, flamechartData, t
|
|
|
68
70
|
});
|
|
69
71
|
};
|
|
70
72
|
const actionButtons = {
|
|
71
|
-
icicle: _jsx(IcicleGraphToolbar, { curPath:
|
|
73
|
+
icicle: _jsx(IcicleGraphToolbar, { curPath: curPathArrow, setNewCurPath: setCurPathArrow }),
|
|
72
74
|
table: (_jsx(TableToolbar, { profileType: profileSource?.ProfileType(), total: total, filtered: filtered, clearSelection: clearSelection, currentSearchString: currentSearchString })),
|
|
73
75
|
};
|
|
74
76
|
const hasProfileSource = profileSource !== undefined && profileSource.toString(timezone) !== '';
|
|
75
|
-
return (_jsx(KeyDownProvider, { children: _jsx(ProfileViewContextProvider, { value: { profileSource, compareMode }, children: _jsxs(DashboardProvider, { children: [_jsx(ProfileHeader, { profileSourceString: profileSource?.toString(timezone), hasProfileSource: hasProfileSource, externalMainActions: profileViewExternalMainActions }), _jsx(VisualisationToolbar, { groupBy: groupBy, toggleGroupBy: toggleGroupBy, hasProfileSource: hasProfileSource, pprofdownloading: pprofDownloading, profileSource: profileSource, queryClient: queryClient, onDownloadPProf: onDownloadPProf, curPath:
|
|
77
|
+
return (_jsx(KeyDownProvider, { children: _jsx(ProfileViewContextProvider, { value: { profileSource, compareMode }, children: _jsxs(DashboardProvider, { children: [_jsx(ProfileHeader, { profileSourceString: profileSource?.toString(timezone), hasProfileSource: hasProfileSource, externalMainActions: profileViewExternalMainActions }), _jsx(VisualisationToolbar, { groupBy: groupBy, toggleGroupBy: toggleGroupBy, hasProfileSource: hasProfileSource, pprofdownloading: pprofDownloading, profileSource: profileSource, queryClient: queryClient, onDownloadPProf: onDownloadPProf, curPath: curPathArrow, setNewCurPath: setCurPathArrow, profileType: profileSource?.ProfileType(), total: total, filtered: filtered, currentSearchString: currentSearchString, setSearchString: setSearchString, groupByLabels: flamegraphData.metadataLabels ?? [], preferencesModal: preferencesModal, profileViewExternalSubActions: profileViewExternalSubActions, clearSelection: clearSelection, setGroupByLabels: setGroupByLabels, showVisualizationSelector: showVisualizationSelector }), isColorStackLegendEnabled && (_jsx(ColorStackLegend, { compareMode: compareMode, mappings: colorMappings, loading: flamegraphData.metadataLoading })), _jsx("div", { className: "w-full", ref: ref, children: _jsx(DashboardLayout, { getDashboardItemByType: getDashboardItemByType, actionButtons: actionButtons }) })] }) }) }));
|
|
76
78
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.492",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@headlessui/react": "^1.7.19",
|
|
7
7
|
"@iconify/react": "^4.0.0",
|
|
8
8
|
"@parca/client": "0.16.127",
|
|
9
|
-
"@parca/components": "0.16.
|
|
9
|
+
"@parca/components": "0.16.326",
|
|
10
10
|
"@parca/dynamicsize": "0.16.65",
|
|
11
11
|
"@parca/hooks": "0.0.82",
|
|
12
12
|
"@parca/icons": "0.16.71",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public",
|
|
78
78
|
"registry": "https://registry.npmjs.org/"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "138b8fa2641b8798af169d4054c27e63cd8b934b"
|
|
81
81
|
}
|
|
@@ -24,6 +24,7 @@ import {getLastItem} from '@parca/utilities';
|
|
|
24
24
|
import {useGraphTooltip} from '../../GraphTooltipArrow/useGraphTooltip';
|
|
25
25
|
import {useGraphTooltipMetaInfo} from '../../GraphTooltipArrow/useGraphTooltipMetaInfo';
|
|
26
26
|
import {hexifyAddress, truncateString} from '../../utils';
|
|
27
|
+
import {CurrentPathFrame} from './utils';
|
|
27
28
|
|
|
28
29
|
interface ContextMenuProps {
|
|
29
30
|
menuId: string;
|
|
@@ -36,8 +37,8 @@ interface ContextMenuProps {
|
|
|
36
37
|
level: number;
|
|
37
38
|
compareAbsolute: boolean;
|
|
38
39
|
trackVisibility: (isVisible: boolean) => void;
|
|
39
|
-
curPath:
|
|
40
|
-
setCurPath: (path:
|
|
40
|
+
curPath: CurrentPathFrame[];
|
|
41
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
41
42
|
hideMenu: () => void;
|
|
42
43
|
hideBinary: (binaryToRemove: string) => void;
|
|
43
44
|
}
|
|
@@ -33,7 +33,13 @@ import {
|
|
|
33
33
|
FIELD_MAPPING_FILE,
|
|
34
34
|
} from './index';
|
|
35
35
|
import useNodeColor from './useNodeColor';
|
|
36
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
CurrentPathFrame,
|
|
38
|
+
arrowToString,
|
|
39
|
+
getCurrentPathFrameData,
|
|
40
|
+
isCurrentPathFrameMatch,
|
|
41
|
+
nodeLabel,
|
|
42
|
+
} from './utils';
|
|
37
43
|
|
|
38
44
|
export const RowHeight = 26;
|
|
39
45
|
|
|
@@ -48,11 +54,11 @@ interface IcicleGraphNodesProps {
|
|
|
48
54
|
total: bigint;
|
|
49
55
|
totalWidth: number;
|
|
50
56
|
level: number;
|
|
51
|
-
curPath:
|
|
52
|
-
setCurPath: (path:
|
|
57
|
+
curPath: CurrentPathFrame[];
|
|
58
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
53
59
|
setHoveringRow: (row: number | null) => void;
|
|
54
60
|
setHoveringLevel: (level: number | null) => void;
|
|
55
|
-
path:
|
|
61
|
+
path: CurrentPathFrame[];
|
|
56
62
|
xScale: (value: bigint) => number;
|
|
57
63
|
searchString?: string;
|
|
58
64
|
sortBy: string;
|
|
@@ -104,7 +110,7 @@ export const IcicleGraphNodes = React.memo(function IcicleGraphNodesNoMemo({
|
|
|
104
110
|
childRows =
|
|
105
111
|
curPath.length === 0
|
|
106
112
|
? childRows
|
|
107
|
-
: childRows.filter(c =>
|
|
113
|
+
: childRows.filter(c => isCurrentPathFrameMatch(table, c, level, curPath[0]));
|
|
108
114
|
|
|
109
115
|
let childrenCumulative = BigInt(0);
|
|
110
116
|
const childrenElements: ReactNode[] = [];
|
|
@@ -159,15 +165,15 @@ export interface IcicleNodeProps {
|
|
|
159
165
|
y: number;
|
|
160
166
|
height: number;
|
|
161
167
|
totalWidth: number;
|
|
162
|
-
curPath:
|
|
168
|
+
curPath: CurrentPathFrame[];
|
|
163
169
|
level: number;
|
|
164
170
|
table: Table<any>;
|
|
165
171
|
row: number;
|
|
166
172
|
colors: colorByColors;
|
|
167
173
|
colorBy: string;
|
|
168
|
-
path:
|
|
174
|
+
path: CurrentPathFrame[];
|
|
169
175
|
total: bigint;
|
|
170
|
-
setCurPath: (path:
|
|
176
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
171
177
|
setHoveringRow: (row: number | null) => void;
|
|
172
178
|
setHoveringLevel: (level: number | null) => void;
|
|
173
179
|
xScale: (value: bigint) => number;
|
|
@@ -343,8 +349,10 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
|
|
|
343
349
|
const name = useMemo(() => {
|
|
344
350
|
return isRoot ? 'root' : nodeLabel(table, row, level, binaries.length > 1);
|
|
345
351
|
}, [table, row, level, isRoot, binaries]);
|
|
346
|
-
const
|
|
347
|
-
const
|
|
352
|
+
const currentPathFrame: CurrentPathFrame = getCurrentPathFrameData(table, row, level);
|
|
353
|
+
const nextPath = path.concat([currentPathFrame]);
|
|
354
|
+
const isFaded =
|
|
355
|
+
curPath.length > 0 && !isCurrentPathFrameMatch(table, row, level, curPath[curPath.length - 1]);
|
|
348
356
|
const styles = isFaded ? fadedIcicleRectStyles : icicleRectStyles;
|
|
349
357
|
const nextLevel = level + 1;
|
|
350
358
|
const nextCurPath = curPath.length === 0 ? [] : curPath.slice(1);
|
|
@@ -38,7 +38,7 @@ import ContextMenu from './ContextMenu';
|
|
|
38
38
|
import {IcicleChartRootNode} from './IcicleChartRootNode';
|
|
39
39
|
import {IcicleNode, RowHeight, colorByColors} from './IcicleGraphNodes';
|
|
40
40
|
import {useFilenamesList} from './useMappingList';
|
|
41
|
-
import {arrowToString, extractFeature, extractFilenameFeature} from './utils';
|
|
41
|
+
import {CurrentPathFrame, arrowToString, extractFeature, extractFilenameFeature} from './utils';
|
|
42
42
|
|
|
43
43
|
export const FIELD_LABELS_ONLY = 'labels_only';
|
|
44
44
|
export const FIELD_MAPPING_FILE = 'mapping_file';
|
|
@@ -66,8 +66,8 @@ interface IcicleGraphArrowProps {
|
|
|
66
66
|
profileType?: ProfileType;
|
|
67
67
|
profileSource?: ProfileSource;
|
|
68
68
|
width?: number;
|
|
69
|
-
curPath:
|
|
70
|
-
setCurPath: (path:
|
|
69
|
+
curPath: CurrentPathFrame[];
|
|
70
|
+
setCurPath: (path: CurrentPathFrame[]) => void;
|
|
71
71
|
sortBy: string;
|
|
72
72
|
flamegraphLoading: boolean;
|
|
73
73
|
isHalfScreen: boolean;
|
|
@@ -26,6 +26,8 @@ import {MergedProfileSource, ProfileSource} from '../../ProfileSource';
|
|
|
26
26
|
import {BigIntDuo, hexifyAddress} from '../../utils';
|
|
27
27
|
import {
|
|
28
28
|
FIELD_FUNCTION_NAME,
|
|
29
|
+
FIELD_FUNCTION_START_LINE,
|
|
30
|
+
FIELD_INLINED,
|
|
29
31
|
FIELD_LABELS_ONLY,
|
|
30
32
|
FIELD_LOCATION_ADDRESS,
|
|
31
33
|
FIELD_MAPPING_FILE,
|
|
@@ -149,3 +151,52 @@ export const boundsFromProfileSource = (profileSource?: ProfileSource): BigIntDu
|
|
|
149
151
|
|
|
150
152
|
return [start, end];
|
|
151
153
|
};
|
|
154
|
+
|
|
155
|
+
export interface CurrentPathFrame {
|
|
156
|
+
functionName: string;
|
|
157
|
+
systemName: string;
|
|
158
|
+
fileName: string;
|
|
159
|
+
lineNumber: number;
|
|
160
|
+
address: string;
|
|
161
|
+
inlined: boolean;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const getCurrentPathFrameData = (
|
|
165
|
+
table: Table<any>,
|
|
166
|
+
row: number,
|
|
167
|
+
_level: number
|
|
168
|
+
): CurrentPathFrame => {
|
|
169
|
+
const functionName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
|
|
170
|
+
const systemName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
|
|
171
|
+
const fileName: string | null = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
|
|
172
|
+
const lineNumber: bigint = table.getChild(FIELD_FUNCTION_START_LINE)?.get(row) ?? 0n;
|
|
173
|
+
const addressBigInt: bigint = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row);
|
|
174
|
+
const address = hexifyAddress(addressBigInt);
|
|
175
|
+
const inlined: boolean | null = table.getChild(FIELD_INLINED)?.get(row);
|
|
176
|
+
|
|
177
|
+
return {
|
|
178
|
+
functionName: functionName ?? '',
|
|
179
|
+
systemName: systemName ?? '',
|
|
180
|
+
fileName: fileName ?? '',
|
|
181
|
+
lineNumber: Number(lineNumber),
|
|
182
|
+
address: address,
|
|
183
|
+
inlined: inlined ?? false,
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export function isCurrentPathFrameMatch(
|
|
188
|
+
table: Table<any>,
|
|
189
|
+
row: number,
|
|
190
|
+
level: number,
|
|
191
|
+
b: CurrentPathFrame
|
|
192
|
+
): boolean {
|
|
193
|
+
const a = getCurrentPathFrameData(table, row, level);
|
|
194
|
+
return (
|
|
195
|
+
a.functionName === b.functionName &&
|
|
196
|
+
a.systemName === b.systemName &&
|
|
197
|
+
a.fileName === b.fileName &&
|
|
198
|
+
a.lineNumber === b.lineNumber &&
|
|
199
|
+
a.address === b.address &&
|
|
200
|
+
a.inlined === b.inlined
|
|
201
|
+
);
|
|
202
|
+
}
|
|
@@ -28,7 +28,7 @@ import {TimelineGuide} from '../TimelineGuide';
|
|
|
28
28
|
import {IcicleGraph} from './IcicleGraph';
|
|
29
29
|
import {FIELD_FUNCTION_NAME, IcicleGraphArrow} from './IcicleGraphArrow';
|
|
30
30
|
import useMappingList from './IcicleGraphArrow/useMappingList';
|
|
31
|
-
import {boundsFromProfileSource} from './IcicleGraphArrow/utils';
|
|
31
|
+
import {CurrentPathFrame, boundsFromProfileSource} from './IcicleGraphArrow/utils';
|
|
32
32
|
|
|
33
33
|
const numberFormatter = new Intl.NumberFormat('en-US');
|
|
34
34
|
|
|
@@ -44,6 +44,8 @@ interface ProfileIcicleGraphProps {
|
|
|
44
44
|
profileSource?: ProfileSource;
|
|
45
45
|
curPath: string[] | [];
|
|
46
46
|
setNewCurPath: (path: string[]) => void;
|
|
47
|
+
curPathArrow: CurrentPathFrame[] | [];
|
|
48
|
+
setNewCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
47
49
|
loading: boolean;
|
|
48
50
|
setActionButtons?: (buttons: React.JSX.Element) => void;
|
|
49
51
|
error?: any;
|
|
@@ -64,6 +66,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
64
66
|
filtered,
|
|
65
67
|
curPath,
|
|
66
68
|
setNewCurPath,
|
|
69
|
+
curPathArrow,
|
|
70
|
+
setNewCurPathArrow,
|
|
67
71
|
profileType,
|
|
68
72
|
loading,
|
|
69
73
|
error,
|
|
@@ -191,8 +195,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
191
195
|
arrow={arrow}
|
|
192
196
|
total={total}
|
|
193
197
|
filtered={filtered}
|
|
194
|
-
curPath={
|
|
195
|
-
setCurPath={
|
|
198
|
+
curPath={curPathArrow}
|
|
199
|
+
setCurPath={setNewCurPathArrow}
|
|
196
200
|
profileType={profileType}
|
|
197
201
|
sortBy={storeSortBy as string}
|
|
198
202
|
flamegraphLoading={isLoading}
|
|
@@ -216,6 +220,8 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
216
220
|
filtered,
|
|
217
221
|
curPath,
|
|
218
222
|
setNewCurPath,
|
|
223
|
+
curPathArrow,
|
|
224
|
+
setNewCurPathArrow,
|
|
219
225
|
profileType,
|
|
220
226
|
storeSortBy,
|
|
221
227
|
isHalfScreen,
|
|
@@ -98,7 +98,11 @@ export const wellKnownProfiles: WellKnownProfiles = {
|
|
|
98
98
|
},
|
|
99
99
|
'parca_agent:samples:count:cpu:nanoseconds:delta': {
|
|
100
100
|
name: 'On-CPU',
|
|
101
|
-
help: 'On CPU profile samples observed by the Parca Agent.',
|
|
101
|
+
help: 'On CPU profile samples as observed by the Parca Agent.',
|
|
102
|
+
},
|
|
103
|
+
'parca_agent:wallclock:nanoseconds:samples:count:delta': {
|
|
104
|
+
name: 'Off-CPU',
|
|
105
|
+
help: 'Time spent off the CPU as observed by the Parca Agent.',
|
|
102
106
|
},
|
|
103
107
|
};
|
|
104
108
|
|
|
@@ -17,6 +17,7 @@ import {ConditionalWrapper} from '@parca/components';
|
|
|
17
17
|
|
|
18
18
|
import Callgraph from '../../../Callgraph';
|
|
19
19
|
import ProfileIcicleGraph from '../../../ProfileIcicleGraph';
|
|
20
|
+
import {CurrentPathFrame} from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
20
21
|
import {ProfileSource} from '../../../ProfileSource';
|
|
21
22
|
import {SourceView} from '../../../SourceView';
|
|
22
23
|
import {Table} from '../../../Table';
|
|
@@ -42,6 +43,8 @@ interface GetDashboardItemProps {
|
|
|
42
43
|
filtered: bigint;
|
|
43
44
|
curPath: string[];
|
|
44
45
|
setNewCurPath: (path: string[]) => void;
|
|
46
|
+
curPathArrow: CurrentPathFrame[];
|
|
47
|
+
setNewCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
45
48
|
currentSearchString?: string;
|
|
46
49
|
setSearchString?: (value: string) => void;
|
|
47
50
|
callgraphSVG?: string;
|
|
@@ -64,6 +67,8 @@ export const getDashboardItem = ({
|
|
|
64
67
|
filtered,
|
|
65
68
|
curPath,
|
|
66
69
|
setNewCurPath,
|
|
70
|
+
curPathArrow,
|
|
71
|
+
setNewCurPathArrow,
|
|
67
72
|
currentSearchString,
|
|
68
73
|
setSearchString,
|
|
69
74
|
callgraphSVG,
|
|
@@ -83,6 +88,8 @@ export const getDashboardItem = ({
|
|
|
83
88
|
<ProfileIcicleGraph
|
|
84
89
|
curPath={curPath}
|
|
85
90
|
setNewCurPath={setNewCurPath}
|
|
91
|
+
curPathArrow={curPathArrow}
|
|
92
|
+
setNewCurPathArrow={setNewCurPathArrow}
|
|
86
93
|
arrow={flamegraphData?.arrow}
|
|
87
94
|
graph={flamegraphData?.data}
|
|
88
95
|
total={total}
|
|
@@ -106,8 +113,10 @@ export const getDashboardItem = ({
|
|
|
106
113
|
case 'iciclechart':
|
|
107
114
|
return (
|
|
108
115
|
<ProfileIcicleGraph
|
|
109
|
-
curPath={
|
|
116
|
+
curPath={[]}
|
|
110
117
|
setNewCurPath={() => {}}
|
|
118
|
+
curPathArrow={[]}
|
|
119
|
+
setNewCurPathArrow={() => {}}
|
|
111
120
|
arrow={flamechartData?.arrow}
|
|
112
121
|
total={total}
|
|
113
122
|
filtered={filtered}
|
|
@@ -19,6 +19,7 @@ import {QueryServiceClient} from '@parca/client';
|
|
|
19
19
|
import {Button, UserPreferencesModal} from '@parca/components';
|
|
20
20
|
import {ProfileType} from '@parca/parser';
|
|
21
21
|
|
|
22
|
+
import {CurrentPathFrame} from '../../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
22
23
|
import {ProfileSource} from '../../../ProfileSource';
|
|
23
24
|
import {useDashboard} from '../../context/DashboardContext';
|
|
24
25
|
import GroupByDropdown from '../ActionButtons/GroupByDropdown';
|
|
@@ -37,8 +38,8 @@ export interface VisualisationToolbarProps {
|
|
|
37
38
|
profileSource?: ProfileSource;
|
|
38
39
|
queryClient?: QueryServiceClient;
|
|
39
40
|
onDownloadPProf: () => void;
|
|
40
|
-
curPath:
|
|
41
|
-
setNewCurPath: (path:
|
|
41
|
+
curPath: CurrentPathFrame[];
|
|
42
|
+
setNewCurPath: (path: CurrentPathFrame[]) => void;
|
|
42
43
|
profileType?: ProfileType;
|
|
43
44
|
total: bigint;
|
|
44
45
|
filtered: bigint;
|
|
@@ -61,8 +62,8 @@ export interface TableToolbarProps {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
export interface IcicleGraphToolbarProps {
|
|
64
|
-
curPath:
|
|
65
|
-
setNewCurPath: (path:
|
|
65
|
+
curPath: CurrentPathFrame[];
|
|
66
|
+
setNewCurPath: (path: CurrentPathFrame[]) => void;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
export const TableToolbar: FC<TableToolbarProps> = ({
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
|
|
14
14
|
import {useCallback, useState} from 'react';
|
|
15
15
|
|
|
16
|
-
import {useURLState} from '@parca/components';
|
|
16
|
+
import {JSONParser, JSONSerializer, useURLState, useURLStateCustom} from '@parca/components';
|
|
17
17
|
|
|
18
18
|
import {FIELD_FUNCTION_NAME, FIELD_LABELS} from '../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
19
|
+
import {CurrentPathFrame} from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
19
20
|
|
|
20
21
|
export const useVisualizationState = (): {
|
|
21
22
|
curPath: string[];
|
|
22
23
|
setCurPath: (path: string[]) => void;
|
|
24
|
+
curPathArrow: CurrentPathFrame[];
|
|
25
|
+
setCurPathArrow: (path: CurrentPathFrame[]) => void;
|
|
23
26
|
currentSearchString: string | undefined;
|
|
24
27
|
setSearchString: (searchString: string | undefined) => void;
|
|
25
28
|
colorStackLegend: string | undefined;
|
|
@@ -31,6 +34,11 @@ export const useVisualizationState = (): {
|
|
|
31
34
|
setGroupByLabels: (labels: string[]) => void;
|
|
32
35
|
} => {
|
|
33
36
|
const [curPath, setCurPath] = useState<string[]>([]);
|
|
37
|
+
const [curPathArrow, setCurPathArrow] = useURLStateCustom<CurrentPathFrame[]>('cur_path', {
|
|
38
|
+
parse: JSONParser<CurrentPathFrame[]>,
|
|
39
|
+
stringify: JSONSerializer,
|
|
40
|
+
defaultValue: '[]',
|
|
41
|
+
});
|
|
34
42
|
const [currentSearchString, setSearchString] = useURLState<string | undefined>('search_string');
|
|
35
43
|
const [colorStackLegend] = useURLState<string | undefined>('color_stack_legend');
|
|
36
44
|
const [colorBy] = useURLState('color_by');
|
|
@@ -69,6 +77,8 @@ export const useVisualizationState = (): {
|
|
|
69
77
|
return {
|
|
70
78
|
curPath,
|
|
71
79
|
setCurPath,
|
|
80
|
+
curPathArrow,
|
|
81
|
+
setCurPathArrow,
|
|
72
82
|
currentSearchString,
|
|
73
83
|
setSearchString,
|
|
74
84
|
colorStackLegend,
|
|
@@ -58,6 +58,8 @@ export const ProfileView = ({
|
|
|
58
58
|
const {
|
|
59
59
|
curPath,
|
|
60
60
|
setCurPath,
|
|
61
|
+
curPathArrow,
|
|
62
|
+
setCurPathArrow,
|
|
61
63
|
currentSearchString,
|
|
62
64
|
setSearchString,
|
|
63
65
|
colorStackLegend,
|
|
@@ -107,6 +109,8 @@ export const ProfileView = ({
|
|
|
107
109
|
filtered,
|
|
108
110
|
curPath,
|
|
109
111
|
setNewCurPath: setCurPath,
|
|
112
|
+
curPathArrow,
|
|
113
|
+
setNewCurPathArrow: setCurPathArrow,
|
|
110
114
|
currentSearchString,
|
|
111
115
|
setSearchString,
|
|
112
116
|
callgraphSVG,
|
|
@@ -115,7 +119,7 @@ export const ProfileView = ({
|
|
|
115
119
|
};
|
|
116
120
|
|
|
117
121
|
const actionButtons = {
|
|
118
|
-
icicle: <IcicleGraphToolbar curPath={
|
|
122
|
+
icicle: <IcicleGraphToolbar curPath={curPathArrow} setNewCurPath={setCurPathArrow} />,
|
|
119
123
|
table: (
|
|
120
124
|
<TableToolbar
|
|
121
125
|
profileType={profileSource?.ProfileType()}
|
|
@@ -146,8 +150,8 @@ export const ProfileView = ({
|
|
|
146
150
|
profileSource={profileSource}
|
|
147
151
|
queryClient={queryClient}
|
|
148
152
|
onDownloadPProf={onDownloadPProf}
|
|
149
|
-
curPath={
|
|
150
|
-
setNewCurPath={
|
|
153
|
+
curPath={curPathArrow}
|
|
154
|
+
setNewCurPath={setCurPathArrow}
|
|
151
155
|
profileType={profileSource?.ProfileType()}
|
|
152
156
|
total={total}
|
|
153
157
|
filtered={filtered}
|