@parca/profile 0.16.244 → 0.16.245
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/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +2 -2
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +5 -1
- package/dist/ProfileIcicleGraph/index.d.ts +3 -4
- package/dist/ProfileIcicleGraph/index.js +8 -9
- package/dist/ProfileView/index.d.ts +2 -3
- package/dist/ProfileView/index.js +1 -1
- package/dist/ProfileViewWithData.js +2 -3
- package/package.json +2 -2
- package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +8 -3
- package/src/ProfileIcicleGraph/index.tsx +11 -13
- package/src/ProfileView/index.tsx +3 -3
- package/src/ProfileViewWithData.tsx +2 -2
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.16.245](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.244...@parca/profile@0.16.245) (2023-09-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.16.244](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.243...@parca/profile@0.16.244) (2023-09-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlamegraphArrow } from '@parca/client';
|
|
3
3
|
import { type NavigateFunction } from '@parca/utilities';
|
|
4
4
|
export declare const FIELD_LABELS_ONLY = "labels_only";
|
|
5
5
|
export declare const FIELD_MAPPING_FILE = "mapping_file";
|
|
@@ -14,7 +14,7 @@ export declare const FIELD_LABELS = "labels";
|
|
|
14
14
|
export declare const FIELD_CUMULATIVE = "cumulative";
|
|
15
15
|
export declare const FIELD_DIFF = "diff";
|
|
16
16
|
interface IcicleGraphArrowProps {
|
|
17
|
-
|
|
17
|
+
arrow: FlamegraphArrow;
|
|
18
18
|
total: bigint;
|
|
19
19
|
filtered: bigint;
|
|
20
20
|
sampleUnit: string;
|
|
@@ -12,6 +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 { memo, useEffect, useMemo, useRef, useState } from 'react';
|
|
15
|
+
import { tableFromIPC } from 'apache-arrow';
|
|
15
16
|
import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
|
|
16
17
|
import { getColorForFeature, selectDarkMode, setHoveringNode, useAppDispatch, useAppSelector, } from '@parca/store';
|
|
17
18
|
import { getLastItem, scaleLinear, selectQueryParam, } from '@parca/utilities';
|
|
@@ -32,10 +33,13 @@ export const FIELD_CHILDREN = 'children';
|
|
|
32
33
|
export const FIELD_LABELS = 'labels';
|
|
33
34
|
export const FIELD_CUMULATIVE = 'cumulative';
|
|
34
35
|
export const FIELD_DIFF = 'diff';
|
|
35
|
-
export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
36
|
+
export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, sampleUnit, navigateTo, sortBy, }) {
|
|
36
37
|
const dispatch = useAppDispatch();
|
|
37
38
|
const [colorProfile] = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key);
|
|
38
39
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
40
|
+
const table = useMemo(() => {
|
|
41
|
+
return tableFromIPC(arrow.record);
|
|
42
|
+
}, [arrow]);
|
|
39
43
|
const [height, setHeight] = useState(0);
|
|
40
44
|
const [hoveringRow, setHoveringRow] = useState(null);
|
|
41
45
|
const [hoveringLevel, setHoveringLevel] = useState(null);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Flamegraph } from '@parca/client';
|
|
2
|
+
import { Flamegraph, FlamegraphArrow } from '@parca/client';
|
|
4
3
|
import { type NavigateFunction } from '@parca/utilities';
|
|
5
4
|
export type ResizeHandler = (width: number, height: number) => void;
|
|
6
5
|
interface ProfileIcicleGraphProps {
|
|
7
6
|
width: number;
|
|
8
7
|
graph?: Flamegraph;
|
|
9
|
-
|
|
8
|
+
arrow?: FlamegraphArrow;
|
|
10
9
|
total: bigint;
|
|
11
10
|
filtered: bigint;
|
|
12
11
|
sampleUnit: string;
|
|
@@ -17,5 +16,5 @@ interface ProfileIcicleGraphProps {
|
|
|
17
16
|
setActionButtons?: (buttons: React.JSX.Element) => void;
|
|
18
17
|
error?: any;
|
|
19
18
|
}
|
|
20
|
-
declare const ProfileIcicleGraph: ({ graph,
|
|
19
|
+
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, sampleUnit, navigateTo, loading, setActionButtons, error, width, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
21
20
|
export default ProfileIcicleGraph;
|
|
@@ -49,7 +49,7 @@ const GroupAndSortActionButtons = ({ navigateTo }) => {
|
|
|
49
49
|
}, [groupBy, setGroupBy]);
|
|
50
50
|
return (_jsxs(_Fragment, { children: [_jsx(GroupByDropdown, { groupBy: groupBy, toggleGroupBy: toggleGroupBy }), _jsx(SortBySelect, { compareMode: compareMode, sortBy: storeSortBy, setSortBy: setStoreSortBy })] }));
|
|
51
51
|
};
|
|
52
|
-
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph,
|
|
52
|
+
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, sampleUnit, navigateTo, loading, setActionButtons, error, width, }) {
|
|
53
53
|
const { loader } = useParcaContext();
|
|
54
54
|
const compareMode = selectQueryParam('compare_a') === 'true' && selectQueryParam('compare_b') === 'true';
|
|
55
55
|
const [storeSortBy = FIELD_FUNCTION_NAME] = useURLState({
|
|
@@ -57,11 +57,10 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, table, to
|
|
|
57
57
|
navigateTo,
|
|
58
58
|
});
|
|
59
59
|
const [totalFormatted, totalUnfilteredFormatted, isTrimmed, trimmedFormatted, trimmedPercentage, isFiltered, filteredPercentage,] = useMemo(() => {
|
|
60
|
-
if (graph === undefined) {
|
|
60
|
+
if (graph === undefined && arrow === undefined) {
|
|
61
61
|
return ['0', '0', false, '0', '0', false, '0', '0'];
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
const trimmed = 0n;
|
|
63
|
+
const trimmed = graph?.trimmed ?? arrow?.trimmed ?? 0n;
|
|
65
64
|
const totalUnfiltered = total + filtered;
|
|
66
65
|
// safeguard against division by zero
|
|
67
66
|
const totalUnfilteredDivisor = totalUnfiltered > 0 ? totalUnfiltered : 1n;
|
|
@@ -74,13 +73,13 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, table, to
|
|
|
74
73
|
filtered > 0,
|
|
75
74
|
numberFormatter.format(divide(total * 100n, totalUnfilteredDivisor)),
|
|
76
75
|
];
|
|
77
|
-
}, [graph, filtered, total]);
|
|
76
|
+
}, [graph, arrow, filtered, total]);
|
|
78
77
|
useEffect(() => {
|
|
79
78
|
if (setActionButtons === undefined) {
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
|
-
setActionButtons(_jsx("div", { className: "flex w-full justify-end gap-2 pb-2", children: _jsxs("div", { className: "ml-2 flex w-full items-end justify-between gap-2", children: [
|
|
83
|
-
}, [navigateTo,
|
|
81
|
+
setActionButtons(_jsx("div", { className: "flex w-full justify-end gap-2 pb-2", children: _jsxs("div", { className: "ml-2 flex w-full items-end justify-between gap-2", children: [arrow !== undefined && _jsx(GroupAndSortActionButtons, { navigateTo: navigateTo }), _jsx("div", { children: _jsx(Button, { color: "neutral", onClick: () => setNewCurPath([]), disabled: curPath.length === 0, variant: "neutral", children: "Reset View" }) })] }) }));
|
|
82
|
+
}, [navigateTo, arrow, curPath, setNewCurPath, setActionButtons]);
|
|
84
83
|
if (loading) {
|
|
85
84
|
return _jsx("div", { className: "h-96", children: loader });
|
|
86
85
|
}
|
|
@@ -88,14 +87,14 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, table, to
|
|
|
88
87
|
console.error('Error: ', error);
|
|
89
88
|
return _jsxs("div", { className: "flex justify-center p-10", children: ["An error occurred: ", error.message] });
|
|
90
89
|
}
|
|
91
|
-
if (graph === undefined &&
|
|
90
|
+
if (graph === undefined && arrow === undefined)
|
|
92
91
|
return _jsx("div", { className: "mx-auto text-center", children: "No data..." });
|
|
93
92
|
if (total === 0n && !loading)
|
|
94
93
|
return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
|
|
95
94
|
if (isTrimmed) {
|
|
96
95
|
console.info(`Trimmed ${trimmedFormatted} (${trimmedPercentage}%) too small values.`);
|
|
97
96
|
}
|
|
98
|
-
return (_jsxs("div", { className: "relative", children: [compareMode && _jsx(DiffLegend, {}), _jsxs("div", { className: "min-h-48", children: [graph !== undefined && (_jsx(IcicleGraph, { width: width, graph: graph, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, sampleUnit: sampleUnit, navigateTo: navigateTo })),
|
|
97
|
+
return (_jsxs("div", { className: "relative", children: [compareMode && _jsx(DiffLegend, {}), _jsxs("div", { className: "min-h-48", children: [graph !== undefined && (_jsx(IcicleGraph, { width: width, graph: graph, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, sampleUnit: sampleUnit, navigateTo: navigateTo })), arrow !== undefined && (_jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, sampleUnit: sampleUnit, navigateTo: navigateTo, sortBy: storeSortBy }))] }), _jsxs("p", { className: "my-2 text-xs", children: ["Showing ", totalFormatted, ' ', isFiltered ? (_jsxs("span", { children: ["(", filteredPercentage, "%) filtered of ", totalUnfilteredFormatted, ' '] })) : (_jsx(_Fragment, {})), "values.", ' '] })] }));
|
|
99
98
|
};
|
|
100
99
|
const groupByOptions = [
|
|
101
100
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Callgraph as CallgraphType, Flamegraph, QueryServiceClient, Source, TableArrow, Top } from '@parca/client';
|
|
1
|
+
import { Callgraph as CallgraphType, Flamegraph, FlamegraphArrow, QueryServiceClient, Source, TableArrow, Top } from '@parca/client';
|
|
3
2
|
import { ProfileSource } from '../ProfileSource';
|
|
4
3
|
type NavigateFunction = (path: string, queryParams: any, options?: {
|
|
5
4
|
replace?: boolean;
|
|
@@ -7,7 +6,7 @@ type NavigateFunction = (path: string, queryParams: any, options?: {
|
|
|
7
6
|
export interface FlamegraphData {
|
|
8
7
|
loading: boolean;
|
|
9
8
|
data?: Flamegraph;
|
|
10
|
-
|
|
9
|
+
arrow?: FlamegraphArrow;
|
|
11
10
|
total?: bigint;
|
|
12
11
|
filtered?: bigint;
|
|
13
12
|
error?: any;
|
|
@@ -130,7 +130,7 @@ export const ProfileView = ({ total, filtered, flamegraphData, topTableData, cal
|
|
|
130
130
|
return (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
|
|
131
131
|
id: 'icicleGraph',
|
|
132
132
|
onRender: perf?.onRender,
|
|
133
|
-
}, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath,
|
|
133
|
+
}, children: _jsx(ProfileIcicleGraph, { curPath: curPath, setNewCurPath: setNewCurPath, arrow: flamegraphData?.arrow, graph: flamegraphData?.data, total: total, filtered: filtered, sampleUnit: sampleUnit, navigateTo: navigateTo, loading: flamegraphData.loading, setActionButtons: setActionButtons, error: flamegraphData.error, width: dimensions?.width !== undefined
|
|
134
134
|
? isHalfScreen
|
|
135
135
|
? (dimensions.width - 40) / 2
|
|
136
136
|
: dimensions.width - 16
|
|
@@ -12,7 +12,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { useEffect, useMemo, useState } from 'react';
|
|
15
|
-
import { tableFromIPC } from 'apache-arrow';
|
|
16
15
|
import { QueryRequest_ReportType } from '@parca/client';
|
|
17
16
|
import { useGrpcMetadata, useParcaContext, useURLState } from '@parca/components';
|
|
18
17
|
import { USER_PREFERENCES, useUIFeatureFlag, useUserPreference } from '@parca/hooks';
|
|
@@ -129,8 +128,8 @@ export const ProfileViewWithData = ({ queryClient, profileSource, navigateTo, })
|
|
|
129
128
|
data: flamegraphResponse?.report.oneofKind === 'flamegraph'
|
|
130
129
|
? flamegraphResponse?.report?.flamegraph
|
|
131
130
|
: undefined,
|
|
132
|
-
|
|
133
|
-
?
|
|
131
|
+
arrow: flamegraphResponse?.report.oneofKind === 'flamegraphArrow'
|
|
132
|
+
? flamegraphResponse?.report?.flamegraphArrow
|
|
134
133
|
: undefined,
|
|
135
134
|
total: BigInt(flamegraphResponse?.total ?? '0'),
|
|
136
135
|
filtered: BigInt(flamegraphResponse?.filtered ?? '0'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.245",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.86",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public",
|
|
50
50
|
"registry": "https://registry.npmjs.org/"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "6f9a132da7b7598c0aed2854f6c525f8ee97d67b"
|
|
53
53
|
}
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
import React, {memo, useEffect, useMemo, useRef, useState} from 'react';
|
|
15
15
|
|
|
16
|
-
import {Dictionary, Table, Vector} from 'apache-arrow';
|
|
16
|
+
import {Dictionary, Table, Vector, tableFromIPC} from 'apache-arrow';
|
|
17
17
|
|
|
18
|
+
import {FlamegraphArrow} from '@parca/client';
|
|
18
19
|
import {USER_PREFERENCES, useUserPreference} from '@parca/hooks';
|
|
19
20
|
import {
|
|
20
21
|
getColorForFeature,
|
|
@@ -51,7 +52,7 @@ export const FIELD_CUMULATIVE = 'cumulative';
|
|
|
51
52
|
export const FIELD_DIFF = 'diff';
|
|
52
53
|
|
|
53
54
|
interface IcicleGraphArrowProps {
|
|
54
|
-
|
|
55
|
+
arrow: FlamegraphArrow;
|
|
55
56
|
total: bigint;
|
|
56
57
|
filtered: bigint;
|
|
57
58
|
sampleUnit: string;
|
|
@@ -63,7 +64,7 @@ interface IcicleGraphArrowProps {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
66
|
-
|
|
67
|
+
arrow,
|
|
67
68
|
total,
|
|
68
69
|
filtered,
|
|
69
70
|
width,
|
|
@@ -79,6 +80,10 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
|
79
80
|
);
|
|
80
81
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
81
82
|
|
|
83
|
+
const table: Table<any> = useMemo(() => {
|
|
84
|
+
return tableFromIPC(arrow.record);
|
|
85
|
+
}, [arrow]);
|
|
86
|
+
|
|
82
87
|
const [height, setHeight] = useState(0);
|
|
83
88
|
const [hoveringRow, setHoveringRow] = useState<number | null>(null);
|
|
84
89
|
const [hoveringLevel, setHoveringLevel] = useState<number | null>(null);
|
|
@@ -15,9 +15,8 @@ import React, {Fragment, useCallback, useEffect, useMemo} from 'react';
|
|
|
15
15
|
|
|
16
16
|
import {Menu, Transition} from '@headlessui/react';
|
|
17
17
|
import {Icon} from '@iconify/react';
|
|
18
|
-
import {Table} from 'apache-arrow';
|
|
19
18
|
|
|
20
|
-
import {Flamegraph} from '@parca/client';
|
|
19
|
+
import {Flamegraph, FlamegraphArrow} from '@parca/client';
|
|
21
20
|
import {Button, Select, useParcaContext, useURLState} from '@parca/components';
|
|
22
21
|
import {divide, selectQueryParam, type NavigateFunction} from '@parca/utilities';
|
|
23
22
|
|
|
@@ -37,7 +36,7 @@ export type ResizeHandler = (width: number, height: number) => void;
|
|
|
37
36
|
interface ProfileIcicleGraphProps {
|
|
38
37
|
width: number;
|
|
39
38
|
graph?: Flamegraph;
|
|
40
|
-
|
|
39
|
+
arrow?: FlamegraphArrow;
|
|
41
40
|
total: bigint;
|
|
42
41
|
filtered: bigint;
|
|
43
42
|
sampleUnit: string;
|
|
@@ -102,7 +101,7 @@ const GroupAndSortActionButtons = ({navigateTo}: {navigateTo?: NavigateFunction}
|
|
|
102
101
|
|
|
103
102
|
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
104
103
|
graph,
|
|
105
|
-
|
|
104
|
+
arrow,
|
|
106
105
|
total,
|
|
107
106
|
filtered,
|
|
108
107
|
curPath,
|
|
@@ -132,12 +131,11 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
132
131
|
isFiltered,
|
|
133
132
|
filteredPercentage,
|
|
134
133
|
] = useMemo(() => {
|
|
135
|
-
if (graph === undefined) {
|
|
134
|
+
if (graph === undefined && arrow === undefined) {
|
|
136
135
|
return ['0', '0', false, '0', '0', false, '0', '0'];
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
const trimmed = 0n;
|
|
138
|
+
const trimmed: bigint = graph?.trimmed ?? arrow?.trimmed ?? 0n;
|
|
141
139
|
|
|
142
140
|
const totalUnfiltered = total + filtered;
|
|
143
141
|
// safeguard against division by zero
|
|
@@ -152,7 +150,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
152
150
|
filtered > 0,
|
|
153
151
|
numberFormatter.format(divide(total * 100n, totalUnfilteredDivisor)),
|
|
154
152
|
];
|
|
155
|
-
}, [graph, filtered, total]);
|
|
153
|
+
}, [graph, arrow, filtered, total]);
|
|
156
154
|
|
|
157
155
|
useEffect(() => {
|
|
158
156
|
if (setActionButtons === undefined) {
|
|
@@ -161,7 +159,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
161
159
|
setActionButtons(
|
|
162
160
|
<div className="flex w-full justify-end gap-2 pb-2">
|
|
163
161
|
<div className="ml-2 flex w-full items-end justify-between gap-2">
|
|
164
|
-
{
|
|
162
|
+
{arrow !== undefined && <GroupAndSortActionButtons navigateTo={navigateTo} />}
|
|
165
163
|
<div>
|
|
166
164
|
<Button
|
|
167
165
|
color="neutral"
|
|
@@ -175,7 +173,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
175
173
|
</div>
|
|
176
174
|
</div>
|
|
177
175
|
);
|
|
178
|
-
}, [navigateTo,
|
|
176
|
+
}, [navigateTo, arrow, curPath, setNewCurPath, setActionButtons]);
|
|
179
177
|
|
|
180
178
|
if (loading) {
|
|
181
179
|
return <div className="h-96">{loader}</div>;
|
|
@@ -186,7 +184,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
186
184
|
return <div className="flex justify-center p-10">An error occurred: {error.message}</div>;
|
|
187
185
|
}
|
|
188
186
|
|
|
189
|
-
if (graph === undefined &&
|
|
187
|
+
if (graph === undefined && arrow === undefined)
|
|
190
188
|
return <div className="mx-auto text-center">No data...</div>;
|
|
191
189
|
|
|
192
190
|
if (total === 0n && !loading)
|
|
@@ -212,10 +210,10 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
|
|
|
212
210
|
navigateTo={navigateTo}
|
|
213
211
|
/>
|
|
214
212
|
)}
|
|
215
|
-
{
|
|
213
|
+
{arrow !== undefined && (
|
|
216
214
|
<IcicleGraphArrow
|
|
217
215
|
width={width}
|
|
218
|
-
|
|
216
|
+
arrow={arrow}
|
|
219
217
|
total={total}
|
|
220
218
|
filtered={filtered}
|
|
221
219
|
curPath={curPath}
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
import {Profiler, ProfilerProps, useEffect, useMemo, useState} from 'react';
|
|
15
15
|
|
|
16
16
|
import {Icon} from '@iconify/react';
|
|
17
|
-
import {Table as ArrowTable} from 'apache-arrow';
|
|
18
17
|
import cx from 'classnames';
|
|
19
18
|
import {scaleLinear} from 'd3';
|
|
20
19
|
import graphviz from 'graphviz-wasm';
|
|
@@ -29,6 +28,7 @@ import {
|
|
|
29
28
|
import {
|
|
30
29
|
Callgraph as CallgraphType,
|
|
31
30
|
Flamegraph,
|
|
31
|
+
FlamegraphArrow,
|
|
32
32
|
QueryServiceClient,
|
|
33
33
|
Source,
|
|
34
34
|
TableArrow,
|
|
@@ -64,7 +64,7 @@ type NavigateFunction = (path: string, queryParams: any, options?: {replace?: bo
|
|
|
64
64
|
export interface FlamegraphData {
|
|
65
65
|
loading: boolean;
|
|
66
66
|
data?: Flamegraph;
|
|
67
|
-
|
|
67
|
+
arrow?: FlamegraphArrow;
|
|
68
68
|
total?: bigint;
|
|
69
69
|
filtered?: bigint;
|
|
70
70
|
error?: any;
|
|
@@ -258,7 +258,7 @@ export const ProfileView = ({
|
|
|
258
258
|
<ProfileIcicleGraph
|
|
259
259
|
curPath={curPath}
|
|
260
260
|
setNewCurPath={setNewCurPath}
|
|
261
|
-
|
|
261
|
+
arrow={flamegraphData?.arrow}
|
|
262
262
|
graph={flamegraphData?.data}
|
|
263
263
|
total={total}
|
|
264
264
|
filtered={filtered}
|
|
@@ -184,9 +184,9 @@ export const ProfileViewWithData = ({
|
|
|
184
184
|
flamegraphResponse?.report.oneofKind === 'flamegraph'
|
|
185
185
|
? flamegraphResponse?.report?.flamegraph
|
|
186
186
|
: undefined,
|
|
187
|
-
|
|
187
|
+
arrow:
|
|
188
188
|
flamegraphResponse?.report.oneofKind === 'flamegraphArrow'
|
|
189
|
-
?
|
|
189
|
+
? flamegraphResponse?.report?.flamegraphArrow
|
|
190
190
|
: undefined,
|
|
191
191
|
total: BigInt(flamegraphResponse?.total ?? '0'),
|
|
192
192
|
filtered: BigInt(flamegraphResponse?.filtered ?? '0'),
|