@parca/profile 0.16.452 → 0.16.454
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/MetricsGraph/MetricsTooltip/index.js +1 -1
- package/dist/MetricsGraphStrips/AreaGraph/Tooltip.d.ts +10 -0
- package/dist/MetricsGraphStrips/AreaGraph/Tooltip.d.ts.map +1 -0
- package/dist/MetricsGraphStrips/AreaGraph/Tooltip.js +44 -0
- package/dist/MetricsGraphStrips/AreaGraph/index.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/AreaGraph/index.js +34 -4
- package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.d.ts +8 -3
- package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.js +8 -8
- package/dist/MetricsGraphStrips/index.d.ts +6 -5
- package/dist/MetricsGraphStrips/index.d.ts.map +1 -1
- package/dist/MetricsGraphStrips/index.js +24 -5
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +1 -0
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +1 -0
- package/dist/ProfileIcicleGraph/index.d.ts +1 -2
- package/dist/ProfileIcicleGraph/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/index.js +4 -4
- package/dist/ProfileView/components/DashboardItems/index.d.ts +1 -2
- package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
- package/dist/ProfileView/components/DashboardItems/index.js +2 -2
- package/dist/ProfileView/context/ProfileViewContext.d.ts +10 -0
- package/dist/ProfileView/context/ProfileViewContext.d.ts.map +1 -1
- package/dist/ProfileView/context/ProfileViewContext.js +1 -0
- package/dist/ProfileView/index.d.ts +1 -1
- package/dist/ProfileView/index.d.ts.map +1 -1
- package/dist/ProfileView/index.js +2 -3
- package/dist/ProfileView/types/visualization.d.ts +2 -0
- package/dist/ProfileView/types/visualization.d.ts.map +1 -1
- package/dist/ProfileViewWithData.d.ts +4 -2
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +7 -4
- package/dist/TimelineGuide/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/src/MetricsGraph/MetricsTooltip/index.tsx +1 -1
- package/src/MetricsGraphStrips/AreaGraph/Tooltip.tsx +83 -0
- package/src/MetricsGraphStrips/AreaGraph/index.tsx +48 -3
- package/src/MetricsGraphStrips/MetricsGraphStrips.stories.tsx +8 -8
- package/src/MetricsGraphStrips/index.tsx +40 -13
- package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +1 -0
- package/src/ProfileIcicleGraph/index.tsx +4 -6
- package/src/ProfileView/components/DashboardItems/index.tsx +0 -3
- package/src/ProfileView/context/ProfileViewContext.tsx +12 -0
- package/src/ProfileView/index.tsx +2 -3
- package/src/ProfileView/types/visualization.ts +2 -0
- package/src/ProfileViewWithData.tsx +11 -5
- package/src/TimelineGuide/index.tsx +0 -5
- package/src/index.tsx +1 -0
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.454](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.453...@parca/profile@0.16.454) (2024-12-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## 0.16.453 (2024-12-05)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## 0.16.452 (2024-12-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -73,7 +73,7 @@ const MetricsTooltip = ({ x, y, highlighted, contextElement, sampleUnit, delta,
|
|
|
73
73
|
}, [x, y, contextElement, update]);
|
|
74
74
|
const nameLabel = highlighted?.labels.find(e => e.name === '__name__');
|
|
75
75
|
const highlightedNameLabel = nameLabel !== undefined ? nameLabel : { name: '', value: '' };
|
|
76
|
-
return (_jsx("div", { ref: setPopperElement, style: styles.popper, ...attributes.popper, className: "z-
|
|
76
|
+
return (_jsx("div", { ref: setPopperElement, style: styles.popper, ...attributes.popper, className: "z-20", children: _jsx("div", { className: "flex max-w-md", children: _jsx("div", { className: "m-auto", children: _jsx("div", { className: "rounded-lg border-gray-300 bg-gray-50 p-3 opacity-90 shadow-lg dark:border-gray-500 dark:bg-gray-900", style: { borderWidth: 1 }, children: _jsx("div", { className: "flex flex-row", children: _jsxs("div", { className: "ml-2 mr-6", children: [_jsx("span", { className: "font-semibold", children: highlightedNameLabel.value }), _jsx("span", { className: "my-2 block text-gray-700 dark:text-gray-300", children: _jsx("table", { className: "table-auto", children: _jsxs("tbody", { children: [delta ? (_jsxs(_Fragment, { children: [_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Per Second" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.valuePerSecond, sampleUnit === 'nanoseconds' ? 'CPU Cores' : sampleUnit, 5) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Total" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.value, sampleUnit, 2) })] })] })) : (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Value" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.valuePerSecond, sampleUnit, 5) })] })), highlighted.duration > 0 && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Duration" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.duration, 'nanoseconds', 2) })] })), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "At" }), _jsx("td", { className: "w-3/4", children: formatDate(highlighted.timestamp, timePattern(timezone), timezone) })] })] }) }) }), _jsx("span", { className: "my-2 block text-gray-500", children: highlighted.labels
|
|
77
77
|
.filter((label) => label.name !== '__name__')
|
|
78
78
|
.map((label) => (_jsx("div", { className: "mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400", children: _jsx(TextWithTooltip, { text: `${label.name}="${label.value}"`, maxTextLength: 37, id: `tooltip-${label.name}` }) }, label.name))) }), _jsxs("div", { className: "flex w-full items-center gap-1 text-xs text-gray-500", children: [_jsx(Icon, { icon: "iconoir:mouse-button-right" }), _jsx("div", { children: "Right click to add labels to query." })] })] }) }) }) }) }) }));
|
|
79
79
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface TooltipProps {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
timestamp: Date;
|
|
5
|
+
value: number;
|
|
6
|
+
containerWidth: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function Tooltip({ x, y, timestamp, value, containerWidth }: TooltipProps): JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/MetricsGraphStrips/AreaGraph/Tooltip.tsx"],"names":[],"mappings":"AAkBA,UAAU,YAAY;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,OAAO,CAAC,EAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAwD3F"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright 2022 The Parca Authors
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { useEffect, useRef, useState } from 'react';
|
|
15
|
+
import { useParcaContext } from '@parca/components';
|
|
16
|
+
import { formatDateTimeDownToMS, valueFormatter } from '@parca/utilities';
|
|
17
|
+
export function Tooltip({ x, y, timestamp, value, containerWidth }) {
|
|
18
|
+
const { timezone } = useParcaContext();
|
|
19
|
+
const tooltipRef = useRef(null);
|
|
20
|
+
const [tooltipPosition, setTooltipPosition] = useState({ x, y });
|
|
21
|
+
const baseOffset = {
|
|
22
|
+
x: 16,
|
|
23
|
+
y: -8,
|
|
24
|
+
};
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (tooltipRef.current != null) {
|
|
27
|
+
const tooltipWidth = tooltipRef.current.offsetWidth;
|
|
28
|
+
let newX = x + baseOffset.x;
|
|
29
|
+
let newY = y + baseOffset.y;
|
|
30
|
+
if (newX + tooltipWidth > containerWidth) {
|
|
31
|
+
newX = x - tooltipWidth - baseOffset.x;
|
|
32
|
+
}
|
|
33
|
+
if (newY < 0) {
|
|
34
|
+
newY = y + Math.abs(baseOffset.y);
|
|
35
|
+
}
|
|
36
|
+
setTooltipPosition({ x: newX, y: newY });
|
|
37
|
+
}
|
|
38
|
+
}, [x, y, containerWidth, baseOffset.x, baseOffset.y]);
|
|
39
|
+
return (_jsx("div", { ref: tooltipRef, className: "absolute bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-200 dark:border-gray-700 p-2 text-sm z-20", style: {
|
|
40
|
+
left: `${tooltipPosition.x}px`,
|
|
41
|
+
top: `${tooltipPosition.y}px`,
|
|
42
|
+
pointerEvents: 'none',
|
|
43
|
+
}, children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("div", { className: "flex gap-1 items-center", children: [_jsx("div", { children: "Timestamp:" }), _jsx("div", { className: "text-gray-600 dark:text-gray-300", children: formatDateTimeDownToMS(timestamp, timezone) })] }), _jsxs("div", { className: "flex gap-1 items-center", children: [_jsx("div", { children: "Value:" }), _jsx("div", { className: "text-gray-600 dark:text-gray-300", children: valueFormatter(value, 'nanoseconds', 2) })] })] }) }));
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MetricsGraphStrips/AreaGraph/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MetricsGraphStrips/AreaGraph/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAGtC,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACxC,kBAAkB,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CAChE;AA8JD,eAAO,MAAM,SAAS,0HAWnB,KAAK,KAAG,GAAG,CAAC,OA8Jd,CAAC"}
|
|
@@ -15,6 +15,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
15
15
|
import { Icon } from '@iconify/react';
|
|
16
16
|
import cx from 'classnames';
|
|
17
17
|
import * as d3 from 'd3';
|
|
18
|
+
import { Tooltip } from './Tooltip';
|
|
18
19
|
const DraggingWindow = ({ dragStart, currentX, }) => {
|
|
19
20
|
const start = useMemo(() => Math.min(dragStart ?? 0, currentX ?? 0), [dragStart, currentX]);
|
|
20
21
|
const width = useMemo(() => Math.abs((dragStart ?? 0) - (currentX ?? 0)), [dragStart, currentX]);
|
|
@@ -79,7 +80,7 @@ const ZoomWindow = ({ zoomWindow, width, onZoomWindowChange, setIsHoveringDragHa
|
|
|
79
80
|
}
|
|
80
81
|
onZoomWindowChange(zoomWindowState);
|
|
81
82
|
setZoomWindowState(undefined);
|
|
82
|
-
}, children: [_jsx("div", { style: { height: '100%', width: beforeWidth, left: beforeStart }, className: cx('bg-gray-500/50 absolute top-0 border-r-2 border-gray-900 dark:border-gray-100 z-
|
|
83
|
+
}, children: [_jsx("div", { style: { height: '100%', width: beforeWidth, left: beforeStart }, className: cx('bg-gray-500/50 absolute top-0 border-r-2 border-gray-900 dark:border-gray-100 z-10'), children: _jsx("div", { className: "w-3 h-4 absolute top-0 right-[-7px] rounded-b bg-gray-200 cursor-ew-resize flex justify-center", onMouseDown: e => {
|
|
83
84
|
setDraggingStart(true);
|
|
84
85
|
e.stopPropagation();
|
|
85
86
|
e.preventDefault();
|
|
@@ -101,6 +102,8 @@ export const AreaGraph = ({ data, height, width, marginLeft = 0, marginRight = 0
|
|
|
101
102
|
const [mousePosition, setMousePosition] = useState(undefined);
|
|
102
103
|
const [dragStart, setDragStart] = useState(undefined);
|
|
103
104
|
const [isHoveringDragHandle, setIsHoveringDragHandle] = useState(false);
|
|
105
|
+
const [hoverData, setHoverData] = useState(null);
|
|
106
|
+
const [isMouseOverGraph, setIsMouseOverGraph] = useState(false);
|
|
104
107
|
const isDragging = dragStart !== undefined;
|
|
105
108
|
// Declare the x (horizontal position) scale.
|
|
106
109
|
const x = d3.scaleUtc(d3.extent(data, d => d.timestamp), [
|
|
@@ -126,11 +129,34 @@ export const AreaGraph = ({ data, height, width, marginLeft = 0, marginRight = 0
|
|
|
126
129
|
setSelectionBounds([x.invert(startPx).getTime(), x.invert(endPx).getTime()]);
|
|
127
130
|
};
|
|
128
131
|
return (_jsxs("div", { style: { height, width }, onMouseMove: e => {
|
|
129
|
-
const [
|
|
130
|
-
|
|
132
|
+
const [xPos, yPos] = d3.pointer(e);
|
|
133
|
+
if (xPos >= marginLeft &&
|
|
134
|
+
xPos <= width - marginRight &&
|
|
135
|
+
yPos >= marginTop &&
|
|
136
|
+
yPos <= height - marginBottom) {
|
|
137
|
+
setMousePosition([xPos, yPos]);
|
|
138
|
+
// Find the closest data point
|
|
139
|
+
if (!isHoveringDragHandle && !isDragging) {
|
|
140
|
+
const xDate = x.invert(xPos);
|
|
141
|
+
const bisect = d3.bisector((d) => d.timestamp).left;
|
|
142
|
+
const index = bisect(data, xDate.getTime());
|
|
143
|
+
const dataPoint = data[index];
|
|
144
|
+
if (dataPoint !== undefined) {
|
|
145
|
+
setHoverData(dataPoint);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
setMousePosition(undefined);
|
|
151
|
+
setHoverData(null);
|
|
152
|
+
}
|
|
153
|
+
}, onMouseEnter: () => {
|
|
154
|
+
setIsMouseOverGraph(true);
|
|
131
155
|
}, onMouseLeave: () => {
|
|
156
|
+
setIsMouseOverGraph(false);
|
|
132
157
|
setMousePosition(undefined);
|
|
133
158
|
setDragStart(undefined);
|
|
159
|
+
setHoverData(null);
|
|
134
160
|
}, onMouseDown: e => {
|
|
135
161
|
// only left mouse button
|
|
136
162
|
if (e.button !== 0) {
|
|
@@ -162,5 +188,9 @@ export const AreaGraph = ({ data, height, width, marginLeft = 0, marginRight = 0
|
|
|
162
188
|
hidden: mousePosition === undefined || isDragging || isHoveringDragHandle,
|
|
163
189
|
}) }), _jsx(DraggingWindow, { dragStart: dragStart, currentX: mousePosition?.[0] }), _jsx(ZoomWindow, { zoomWindow: zoomWindow, width: width, onZoomWindowChange: setSelectionBoundsWithScaling, setIsHoveringDragHandle: setIsHoveringDragHandle }), _jsx("div", { className: cx('absolute top-0 left-0 w-full h-full bg-gray-900/50 dark:bg-gray-200/50', {
|
|
164
190
|
hidden: isDragging || selectionBounds !== undefined,
|
|
165
|
-
}) }),
|
|
191
|
+
}) }), mousePosition !== undefined &&
|
|
192
|
+
hoverData !== null &&
|
|
193
|
+
!isDragging &&
|
|
194
|
+
!isHoveringDragHandle &&
|
|
195
|
+
isMouseOverGraph && (_jsx(Tooltip, { x: mousePosition[0], y: mousePosition[1], timestamp: new Date(hoverData.timestamp), value: hoverData.value, containerWidth: width })), _jsx("svg", { style: { width: '100%', height: '100%' }, children: _jsx("path", { fill: fill, d: area(data), className: "opacity-80" }) })] }));
|
|
166
196
|
};
|
|
@@ -5,13 +5,18 @@ declare const meta: Meta;
|
|
|
5
5
|
export default meta;
|
|
6
6
|
export declare const ThreeCPUStrips: {
|
|
7
7
|
args: {
|
|
8
|
-
cpus:
|
|
8
|
+
cpus: {
|
|
9
|
+
labels: {
|
|
10
|
+
name: string;
|
|
11
|
+
value: number;
|
|
12
|
+
}[];
|
|
13
|
+
}[];
|
|
9
14
|
data: DataPoint[][];
|
|
10
|
-
|
|
15
|
+
selectedTimeframe: {
|
|
11
16
|
index: number;
|
|
12
17
|
bounds: number[];
|
|
13
18
|
};
|
|
14
|
-
|
|
19
|
+
onSelectedTimeframe: (index: number, bounds: NumberDuo) => void;
|
|
15
20
|
};
|
|
16
21
|
render: (args: any) => JSX.Element;
|
|
17
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricsGraphStrips.stories.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/MetricsGraphStrips.stories.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAqBtC,QAAA,MAAM,IAAI,EAAE,IAGX,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"MetricsGraphStrips.stories.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/MetricsGraphStrips.stories.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAqBtC,QAAA,MAAM,IAAI,EAAE,IAGX,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,cAAc;;;;;;;;;;;;;qCAKM,MAAM,UAAU,SAAS,KAAG,IAAI;;mBAI9B,GAAG,KAAG,GAAG,CAAC,OAAO;CAUnD,CAAC"}
|
|
@@ -37,19 +37,19 @@ const meta = {
|
|
|
37
37
|
export default meta;
|
|
38
38
|
export const ThreeCPUStrips = {
|
|
39
39
|
args: {
|
|
40
|
-
cpus: Array.from(mockData, (_, i) =>
|
|
40
|
+
cpus: Array.from(mockData, (_, i) => ({ labels: [{ name: 'cpuid', value: i + 1 }] })),
|
|
41
41
|
data: mockData,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
console.log('
|
|
42
|
+
selectedTimeframe: { index: 1, bounds: [mockData[0][25].timestamp, mockData[0][100].timestamp] },
|
|
43
|
+
onSelectedTimeframe: (index, bounds) => {
|
|
44
|
+
console.log('onSelectedTimeframe', index, bounds);
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
render: function Component(args) {
|
|
48
48
|
const [, setArgs] = useArgs();
|
|
49
|
-
const
|
|
50
|
-
args.
|
|
51
|
-
setArgs({ ...args,
|
|
49
|
+
const onSelectedTimeframe = (index, bounds) => {
|
|
50
|
+
args.onSelectedTimeframe(index, bounds);
|
|
51
|
+
setArgs({ ...args, selectedTimeframe: { index, bounds } });
|
|
52
52
|
};
|
|
53
|
-
return _jsx(MetricsGraphStrips, { ...args,
|
|
53
|
+
return _jsx(MetricsGraphStrips, { ...args, onSelectedTimeframe: onSelectedTimeframe });
|
|
54
54
|
},
|
|
55
55
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { LabelSet } from '@parca/client';
|
|
1
2
|
import { NumberDuo } from '../utils';
|
|
2
3
|
import { DataPoint } from './AreaGraph';
|
|
3
4
|
interface Props {
|
|
4
|
-
cpus:
|
|
5
|
+
cpus: LabelSet[];
|
|
5
6
|
data: DataPoint[][];
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
selectedTimeframe?: {
|
|
8
|
+
labels: LabelSet;
|
|
8
9
|
bounds: NumberDuo;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
onSelectedTimeframe: (labels: LabelSet, bounds: NumberDuo | undefined) => void;
|
|
11
12
|
width?: number;
|
|
12
13
|
}
|
|
13
|
-
export declare const MetricsGraphStrips: ({ cpus, data,
|
|
14
|
+
export declare const MetricsGraphStrips: ({ cpus, data, selectedTimeframe, onSelectedTimeframe, width, }: Props) => JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MetricsGraphStrips/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAY,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE;QAClB,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,mBAAmB,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2BD,eAAO,MAAM,kBAAkB,mEAM5B,KAAK,KAAG,GAAG,CAAC,OAmEd,CAAC"}
|
|
@@ -16,10 +16,26 @@ import { Icon } from '@iconify/react';
|
|
|
16
16
|
import * as d3 from 'd3';
|
|
17
17
|
import { TimelineGuide } from '../TimelineGuide';
|
|
18
18
|
import { AreaGraph } from './AreaGraph';
|
|
19
|
+
const labelSetToString = (labelSet) => {
|
|
20
|
+
if (labelSet === undefined) {
|
|
21
|
+
return '{}';
|
|
22
|
+
}
|
|
23
|
+
let str = '{';
|
|
24
|
+
let isFirst = true;
|
|
25
|
+
for (const label of labelSet.labels) {
|
|
26
|
+
if (!isFirst) {
|
|
27
|
+
str += ', ';
|
|
28
|
+
isFirst = false;
|
|
29
|
+
}
|
|
30
|
+
str += `${label.name}: ${label.value}`;
|
|
31
|
+
}
|
|
32
|
+
str += '}';
|
|
33
|
+
return str;
|
|
34
|
+
};
|
|
19
35
|
const getTimelineGuideHeight = (cpus, collapsedIndices) => {
|
|
20
36
|
return 56 * (cpus.length - collapsedIndices.length) + 20 * collapsedIndices.length + 24;
|
|
21
37
|
};
|
|
22
|
-
export const MetricsGraphStrips = ({ cpus, data,
|
|
38
|
+
export const MetricsGraphStrips = ({ cpus, data, selectedTimeframe, onSelectedTimeframe, width, }) => {
|
|
23
39
|
const [collapsedIndices, setCollapsedIndices] = useState([]);
|
|
24
40
|
// @ts-expect-error
|
|
25
41
|
const color = d3.scaleOrdinal(d3.schemeObservable10);
|
|
@@ -35,7 +51,10 @@ export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTim
|
|
|
35
51
|
}, [data]);
|
|
36
52
|
return (_jsxs("div", { className: "flex flex-col gap-1 relative my-0 ml-[70px]", style: { width: width ?? '100%' }, children: [_jsx(TimelineGuide, { bounds: bounds, width: width ?? 1468, height: getTimelineGuideHeight(cpus, collapsedIndices), margin: 1 }), cpus.map((cpu, i) => {
|
|
37
53
|
const isCollapsed = collapsedIndices.includes(i);
|
|
38
|
-
|
|
54
|
+
const labelStr = labelSetToString(cpu);
|
|
55
|
+
return (_jsxs("div", { className: "relative min-h-5", style: { width: width ?? 1468 }, children: [_jsxs("div", { className: "text-xs absolute top-0 left-0 flex gap-[2px] items-center bg-white/50 px-1 rounded-sm cursor-pointer", style: {
|
|
56
|
+
zIndex: 15,
|
|
57
|
+
}, onClick: () => {
|
|
39
58
|
const newCollapsedIndices = [...collapsedIndices];
|
|
40
59
|
if (collapsedIndices.includes(i)) {
|
|
41
60
|
newCollapsedIndices.splice(newCollapsedIndices.indexOf(i), 1);
|
|
@@ -44,8 +63,8 @@ export const MetricsGraphStrips = ({ cpus, data, selectedTimeline, onSelectedTim
|
|
|
44
63
|
newCollapsedIndices.push(i);
|
|
45
64
|
}
|
|
46
65
|
setCollapsedIndices(newCollapsedIndices);
|
|
47
|
-
}, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }),
|
|
48
|
-
|
|
49
|
-
} })) : null] },
|
|
66
|
+
}, children: [_jsx(Icon, { icon: isCollapsed ? 'bxs:right-arrow' : 'bxs:down-arrow' }), labelStr] }), !isCollapsed ? (_jsx(AreaGraph, { data: data[i], height: 56, width: width ?? 1468, fill: color(labelStr), selectionBounds: cpu === selectedTimeframe?.labels ? selectedTimeframe.bounds : undefined, setSelectionBounds: bounds => {
|
|
67
|
+
onSelectedTimeframe(cpu, bounds);
|
|
68
|
+
} })) : null] }, labelStr));
|
|
50
69
|
})] }));
|
|
51
70
|
};
|
|
@@ -9,6 +9,7 @@ export declare const FIELD_MAPPING_BUILD_ID = "mapping_build_id";
|
|
|
9
9
|
export declare const FIELD_LOCATION_ADDRESS = "location_address";
|
|
10
10
|
export declare const FIELD_LOCATION_LINE = "location_line";
|
|
11
11
|
export declare const FIELD_INLINED = "inlined";
|
|
12
|
+
export declare const FIELD_TIMESTAMP = "timestamp";
|
|
12
13
|
export declare const FIELD_FUNCTION_NAME = "function_name";
|
|
13
14
|
export declare const FIELD_FUNCTION_SYSTEM_NAME = "function_system_name";
|
|
14
15
|
export declare const FIELD_FUNCTION_FILE_NAME = "function_file_name";
|
|
@@ -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;AAO5E,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAIxE,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,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;AAEjC,UAAU,qBAAqB;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,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;CAC1B;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,mDAiR3B,CAAC;AAEH,eAAe,gBAAgB,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,EAA2B,KAAK,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAO5E,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAIxE,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,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;AAEjC,UAAU,qBAAqB;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,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;CAC1B;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,mDAiR3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -32,6 +32,7 @@ export const FIELD_MAPPING_BUILD_ID = 'mapping_build_id';
|
|
|
32
32
|
export const FIELD_LOCATION_ADDRESS = 'location_address';
|
|
33
33
|
export const FIELD_LOCATION_LINE = 'location_line';
|
|
34
34
|
export const FIELD_INLINED = 'inlined';
|
|
35
|
+
export const FIELD_TIMESTAMP = 'timestamp';
|
|
35
36
|
export const FIELD_FUNCTION_NAME = 'function_name';
|
|
36
37
|
export const FIELD_FUNCTION_SYSTEM_NAME = 'function_system_name';
|
|
37
38
|
export const FIELD_FUNCTION_FILE_NAME = 'function_file_name';
|
|
@@ -17,8 +17,7 @@ interface ProfileIcicleGraphProps {
|
|
|
17
17
|
isHalfScreen: boolean;
|
|
18
18
|
metadataMappingFiles?: string[];
|
|
19
19
|
metadataLoading?: boolean;
|
|
20
|
-
showTimelineGuide?: boolean;
|
|
21
20
|
}
|
|
22
|
-
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles,
|
|
21
|
+
declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, }: ProfileIcicleGraphProps) => JSX.Element;
|
|
23
22
|
export default ProfileIcicleGraph;
|
|
24
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAY1C,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,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAY1C,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,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,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;CAC3B;AAMD,QAAA,MAAM,kBAAkB,uIAarB,uBAAuB,KAAG,GAAG,CAAC,OA2LhC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -25,9 +25,9 @@ const numberFormatter = new Intl.NumberFormat('en-US');
|
|
|
25
25
|
const ErrorContent = ({ errorMessage }) => {
|
|
26
26
|
return _jsx("div", { className: "flex justify-center p-10", children: errorMessage });
|
|
27
27
|
};
|
|
28
|
-
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles,
|
|
28
|
+
const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, error, width, isHalfScreen, metadataMappingFiles, }) {
|
|
29
29
|
const { onError, authenticationErrorMessage, isDarkMode } = useParcaContext();
|
|
30
|
-
const { compareMode } = useProfileViewContext();
|
|
30
|
+
const { compareMode, timelineGuide } = useProfileViewContext();
|
|
31
31
|
const [isLoading, setIsLoading] = useState(true);
|
|
32
32
|
const mappingsList = useMappingList(metadataMappingFiles);
|
|
33
33
|
const [storeSortBy = FIELD_FUNCTION_NAME] = useURLState('sort_by');
|
|
@@ -83,7 +83,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
83
83
|
if (graph !== undefined)
|
|
84
84
|
return (_jsx(IcicleGraph, { width: width, graph: graph, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType }));
|
|
85
85
|
if (arrow !== undefined)
|
|
86
|
-
return (_jsxs("div", { className: "relative", children: [
|
|
86
|
+
return (_jsxs("div", { className: "relative", children: [timelineGuide?.show === true && (_jsx(TimelineGuide, { bounds: timelineGuide.props.bounds, width: width, height: 1000, margin: 0, ticks: 60000 / 10000 })), _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPath, setCurPath: setNewCurPath, profileType: profileType, sortBy: storeSortBy, flamegraphLoading: isLoading, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute })] }));
|
|
87
87
|
}, [
|
|
88
88
|
isLoading,
|
|
89
89
|
graph,
|
|
@@ -100,7 +100,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ graph, arrow, to
|
|
|
100
100
|
isDarkMode,
|
|
101
101
|
mappingsList,
|
|
102
102
|
isCompareAbsolute,
|
|
103
|
-
|
|
103
|
+
timelineGuide,
|
|
104
104
|
]);
|
|
105
105
|
if (error != null) {
|
|
106
106
|
onError?.(error);
|
|
@@ -20,8 +20,7 @@ interface GetDashboardItemProps {
|
|
|
20
20
|
perf?: {
|
|
21
21
|
onRender?: ProfilerOnRenderCallback;
|
|
22
22
|
};
|
|
23
|
-
showTimelineGuide?: boolean;
|
|
24
23
|
}
|
|
25
|
-
export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf,
|
|
24
|
+
export declare const getDashboardItem: ({ type, isHalfScreen, dimensions, flamegraphData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, }: GetDashboardItemProps) => JSX.Element;
|
|
26
25
|
export {};
|
|
27
26
|
//# 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,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,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,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;
|
|
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,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,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,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,mNAiB1B,qBAAqB,KAAG,GAAG,CAAC,OA+E9B,CAAC"}
|
|
@@ -17,7 +17,7 @@ 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, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf,
|
|
20
|
+
export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphData, topTableData, callgraphData, sourceData, profileSource, total, filtered, curPath, setNewCurPath, currentSearchString, setSearchString, callgraphSVG, perf, }) => {
|
|
21
21
|
switch (type) {
|
|
22
22
|
case 'icicle':
|
|
23
23
|
return (_jsx(ConditionalWrapper, { condition: perf?.onRender != null, WrapperComponent: Profiler, wrapperProps: {
|
|
@@ -27,7 +27,7 @@ export const getDashboardItem = ({ type, isHalfScreen, dimensions, flamegraphDat
|
|
|
27
27
|
? isHalfScreen
|
|
28
28
|
? (dimensions.width - 54) / 2
|
|
29
29
|
: dimensions.width - 16
|
|
30
|
-
: 0, metadataMappingFiles: flamegraphData.metadataMappingFiles, metadataLoading: flamegraphData.metadataLoading
|
|
30
|
+
: 0, metadataMappingFiles: flamegraphData.metadataMappingFiles, metadataLoading: flamegraphData.metadataLoading }) }));
|
|
31
31
|
case 'callgraph':
|
|
32
32
|
return callgraphData?.data !== undefined &&
|
|
33
33
|
callgraphSVG !== undefined &&
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ProfileSource } from '../../ProfileSource';
|
|
3
|
+
import { NumberDuo } from '../../utils';
|
|
4
|
+
export type TimelineGuideData = {
|
|
5
|
+
show: false;
|
|
6
|
+
} | {
|
|
7
|
+
show: true;
|
|
8
|
+
props: {
|
|
9
|
+
bounds: NumberDuo;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
3
12
|
interface Props {
|
|
4
13
|
profileSource?: ProfileSource;
|
|
5
14
|
compareMode: boolean;
|
|
15
|
+
timelineGuide?: TimelineGuideData;
|
|
6
16
|
}
|
|
7
17
|
export declare const defaultValue: Props;
|
|
8
18
|
declare const ProfileViewContext: import("react").Context<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileViewContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/context/ProfileViewContext.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,SAAS,EAA4B,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfileViewContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/context/ProfileViewContext.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,SAAS,EAA4B,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,iBAAiB,GACzB;IAAC,IAAI,EAAE,KAAK,CAAA;CAAC,GACb;IACE,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE;QACL,MAAM,EAAE,SAAS,CAAC;KACnB,CAAC;CACH,CAAC;AAEN,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,QAAA,MAAM,kBAAkB,gCAAqC,CAAC;AAE9D,eAAO,MAAM,0BAA0B,yBAGpC;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,KAAG,GAAG,CAAC,OAMP,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,KAMxC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -15,6 +15,7 @@ import { createContext, useContext } from 'react';
|
|
|
15
15
|
export const defaultValue = {
|
|
16
16
|
profileSource: undefined,
|
|
17
17
|
compareMode: false,
|
|
18
|
+
timelineGuide: { show: false },
|
|
18
19
|
};
|
|
19
20
|
const ProfileViewContext = createContext(defaultValue);
|
|
20
21
|
export const ProfileViewContextProvider = ({ children, value, }) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ProfileViewProps } from './types/visualization';
|
|
2
|
-
export declare const ProfileView: ({ total, filtered, flamegraphData, topTableData, callgraphData, sourceData, profileSource, queryClient, onDownloadPProf, pprofDownloading, compare, showVisualizationSelector,
|
|
2
|
+
export declare const ProfileView: ({ total, filtered, flamegraphData, topTableData, callgraphData, sourceData, profileSource, queryClient, onDownloadPProf, pprofDownloading, compare, showVisualizationSelector, timelineGuide, }: ProfileViewProps) => JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,
|
|
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,oMAcrB,gBAAgB,KAAG,GAAG,CAAC,OAwIzB,CAAC"}
|
|
@@ -26,7 +26,7 @@ import { useGraphviz } from './hooks/useGraphviz';
|
|
|
26
26
|
import { useProfileMetadata } from './hooks/useProfileMetadata';
|
|
27
27
|
import { useVisualizationState } from './hooks/useVisualizationState';
|
|
28
28
|
import { getColorRange } from './utils/colorUtils';
|
|
29
|
-
export const ProfileView = ({ total, filtered, flamegraphData, topTableData, callgraphData, sourceData, profileSource, queryClient, onDownloadPProf, pprofDownloading, compare, showVisualizationSelector,
|
|
29
|
+
export const ProfileView = ({ total, filtered, flamegraphData, topTableData, callgraphData, sourceData, profileSource, queryClient, onDownloadPProf, pprofDownloading, compare, showVisualizationSelector, timelineGuide, }) => {
|
|
30
30
|
const { timezone, perf, profileViewExternalMainActions, preferencesModal, profileViewExternalSubActions, } = useParcaContext();
|
|
31
31
|
const { ref, dimensions } = useContainerDimensions();
|
|
32
32
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
@@ -64,7 +64,6 @@ export const ProfileView = ({ total, filtered, flamegraphData, topTableData, cal
|
|
|
64
64
|
setSearchString,
|
|
65
65
|
callgraphSVG,
|
|
66
66
|
perf,
|
|
67
|
-
showTimelineGuide,
|
|
68
67
|
});
|
|
69
68
|
};
|
|
70
69
|
const actionButtons = {
|
|
@@ -72,5 +71,5 @@ export const ProfileView = ({ total, filtered, flamegraphData, topTableData, cal
|
|
|
72
71
|
table: (_jsx(TableToolbar, { profileType: profileSource?.ProfileType(), total: total, filtered: filtered, clearSelection: clearSelection, currentSearchString: currentSearchString })),
|
|
73
72
|
};
|
|
74
73
|
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: curPath, setNewCurPath: setCurPath, 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 }) })] }) }) }));
|
|
74
|
+
return (_jsx(KeyDownProvider, { children: _jsx(ProfileViewContextProvider, { value: { profileSource, compareMode, timelineGuide }, 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: curPath, setNewCurPath: setCurPath, 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
75
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Callgraph as CallgraphType, Flamegraph, FlamegraphArrow, QueryServiceClient, Source, TableArrow } from '@parca/client';
|
|
2
2
|
import { ProfileSource } from '../../ProfileSource';
|
|
3
|
+
import { TimelineGuideData } from '../context/ProfileViewContext';
|
|
3
4
|
export interface FlamegraphData {
|
|
4
5
|
loading: boolean;
|
|
5
6
|
data?: Flamegraph;
|
|
@@ -46,5 +47,6 @@ export interface ProfileViewProps {
|
|
|
46
47
|
pprofDownloading?: boolean;
|
|
47
48
|
showVisualizationSelector?: boolean;
|
|
48
49
|
showTimelineGuide?: boolean;
|
|
50
|
+
timelineGuide?: TimelineGuideData;
|
|
49
51
|
}
|
|
50
52
|
//# sourceMappingURL=visualization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualization.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/types/visualization.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,UAAU,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"visualization.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/types/visualization.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,UAAU,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,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,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { QueryServiceClient } from '@parca/client';
|
|
2
2
|
import { ProfileSource } from './ProfileSource';
|
|
3
|
+
import { TimelineGuideData } from './ProfileView/context/ProfileViewContext';
|
|
3
4
|
interface ProfileViewWithDataProps {
|
|
4
5
|
queryClient: QueryServiceClient;
|
|
5
6
|
profileSource: ProfileSource;
|
|
6
7
|
compare?: boolean;
|
|
7
8
|
showVisualizationSelector?: boolean;
|
|
8
|
-
|
|
9
|
+
isGroupByTimestamp?: boolean;
|
|
10
|
+
timelineGuide?: TimelineGuideData;
|
|
9
11
|
}
|
|
10
|
-
export declare const ProfileViewWithData: ({ queryClient, profileSource, showVisualizationSelector,
|
|
12
|
+
export declare const ProfileViewWithData: ({ queryClient, profileSource, showVisualizationSelector, isGroupByTimestamp, timelineGuide, }: ProfileViewWithDataProps) => JSX.Element;
|
|
11
13
|
export default ProfileViewWithData;
|
|
12
14
|
//# sourceMappingURL=ProfileViewWithData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA0B,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAK1E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfileViewWithData.d.ts","sourceRoot":"","sources":["../src/ProfileViewWithData.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA0B,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAK1E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAI3E,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC;AAED,eAAO,MAAM,mBAAmB,kGAM7B,wBAAwB,KAAG,GAAG,CAAC,OAsNjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -15,11 +15,11 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import { QueryRequest_ReportType } from '@parca/client';
|
|
16
16
|
import { useGrpcMetadata, useParcaContext, useURLState } from '@parca/components';
|
|
17
17
|
import { saveAsBlob } from '@parca/utilities';
|
|
18
|
-
import { FIELD_FUNCTION_NAME } from './ProfileIcicleGraph/IcicleGraphArrow';
|
|
18
|
+
import { FIELD_FUNCTION_NAME, FIELD_TIMESTAMP } from './ProfileIcicleGraph/IcicleGraphArrow';
|
|
19
19
|
import { ProfileView } from './ProfileView';
|
|
20
20
|
import { useQuery } from './useQuery';
|
|
21
21
|
import { downloadPprof } from './utils';
|
|
22
|
-
export const ProfileViewWithData = ({ queryClient, profileSource, showVisualizationSelector,
|
|
22
|
+
export const ProfileViewWithData = ({ queryClient, profileSource, showVisualizationSelector, isGroupByTimestamp, timelineGuide, }) => {
|
|
23
23
|
const metadata = useGrpcMetadata();
|
|
24
24
|
const [dashboardItems] = useURLState('dashboard_items', {
|
|
25
25
|
alwaysReturnArray: true,
|
|
@@ -27,7 +27,10 @@ export const ProfileViewWithData = ({ queryClient, profileSource, showVisualizat
|
|
|
27
27
|
const [sourceBuildID] = useURLState('source_buildid');
|
|
28
28
|
const [sourceFilename] = useURLState('source_filename');
|
|
29
29
|
const [groupBy] = useURLState('group_by', {
|
|
30
|
-
defaultValue: [
|
|
30
|
+
defaultValue: [
|
|
31
|
+
isGroupByTimestamp === true ? FIELD_TIMESTAMP : null,
|
|
32
|
+
FIELD_FUNCTION_NAME,
|
|
33
|
+
].filter(Boolean),
|
|
31
34
|
alwaysReturnArray: true,
|
|
32
35
|
});
|
|
33
36
|
const [invertStack] = useURLState('invert_call_stack');
|
|
@@ -168,6 +171,6 @@ export const ProfileViewWithData = ({ queryClient, profileSource, showVisualizat
|
|
|
168
171
|
? sourceResponse?.report?.source
|
|
169
172
|
: undefined,
|
|
170
173
|
error: sourceError,
|
|
171
|
-
}, profileSource: profileSource, queryClient: queryClient, onDownloadPProf: () => void downloadPProfClick(), pprofDownloading: pprofDownloading, showVisualizationSelector: showVisualizationSelector,
|
|
174
|
+
}, profileSource: profileSource, queryClient: queryClient, onDownloadPProf: () => void downloadPProfClick(), pprofDownloading: pprofDownloading, showVisualizationSelector: showVisualizationSelector, timelineGuide: timelineGuide }));
|
|
172
175
|
};
|
|
173
176
|
export default ProfileViewWithData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimelineGuide/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,eAAO,MAAM,aAAa,6CAA4C,KAAK,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimelineGuide/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,eAAO,MAAM,aAAa,6CAA4C,KAAK,KAAG,GAAG,CAAC,OAyDjF,CAAC"}
|