@parca/profile 0.16.377 → 0.16.378
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
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.378](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.377...@parca/profile@0.16.378) (2024-05-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.16.377](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.376...@parca/profile@0.16.377) (2024-05-30)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -49,6 +49,7 @@ export const getMappingColors = (mappingsList, isDarkMode, currentColorProfile)
|
|
|
49
49
|
});
|
|
50
50
|
return colors;
|
|
51
51
|
};
|
|
52
|
+
const noop = () => { };
|
|
52
53
|
export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, navigateTo, sortBy, flamegraphLoading, mappingsListFromMetadata, }) {
|
|
53
54
|
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
|
54
55
|
const dispatch = useAppDispatch();
|
|
@@ -139,9 +140,20 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
139
140
|
const newMappingsList = mappingsListFromMetadata.filter(mapping => mapping !== binaryToRemove);
|
|
140
141
|
setBinaryFrameFilter(newMappingsList);
|
|
141
142
|
};
|
|
143
|
+
const highlightSimilarStacksName = highlightSimilarStacksPreference ? hoveringName : null;
|
|
144
|
+
const highlightSimilarStacksSetName = useMemo(() => {
|
|
145
|
+
return highlightSimilarStacksPreference ? setHoveringName : noop;
|
|
146
|
+
}, [highlightSimilarStacksPreference]);
|
|
147
|
+
const highlightSimilarStacksSetLevel = useMemo(() => {
|
|
148
|
+
return highlightSimilarStacksPreference ? setHoveringLevel : noop;
|
|
149
|
+
}, [highlightSimilarStacksPreference]);
|
|
150
|
+
const highlightSimilarStacksRow = highlightSimilarStacksPreference ? hoveringRow : null;
|
|
151
|
+
const path = useMemo(() => {
|
|
152
|
+
return [];
|
|
153
|
+
}, []);
|
|
142
154
|
// useMemo for the root graph as it otherwise renders the whole graph if the hoveringRow changes.
|
|
143
155
|
const root = useMemo(() => {
|
|
144
|
-
return (_jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, onContextMenu: displayMenu, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { table: table, row: 0, mappingColors: mappingColors, x: 0, y: 0, totalWidth: width ?? 1, height: RowHeight, setCurPath: setCurPath, curPath: curPath, total: total, xScale: xScale, path:
|
|
156
|
+
return (_jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, onContextMenu: displayMenu, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { table: table, row: 0, mappingColors: mappingColors, x: 0, y: 0, totalWidth: width ?? 1, height: RowHeight, setCurPath: setCurPath, curPath: curPath, total: total, xScale: xScale, path: path, level: 0, isRoot: true, searchString: currentSearchString, setHoveringRow: setHoveringRow, setHoveringLevel: highlightSimilarStacksSetLevel, sortBy: sortBy, darkMode: isDarkMode, compareMode: compareMode, profileType: profileType, isContextMenuOpen: isContextMenuOpen, hoveringName: highlightSimilarStacksName, setHoveringName: highlightSimilarStacksSetName, hoveringRow: highlightSimilarStacksRow, colorForSimilarNodes: colorForSimilarNodes, highlightSimilarStacksPreference: highlightSimilarStacksPreference }) }) }) }));
|
|
145
157
|
}, [
|
|
146
158
|
width,
|
|
147
159
|
height,
|
|
@@ -158,10 +170,13 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
158
170
|
compareMode,
|
|
159
171
|
profileType,
|
|
160
172
|
isContextMenuOpen,
|
|
161
|
-
|
|
162
|
-
|
|
173
|
+
highlightSimilarStacksName,
|
|
174
|
+
highlightSimilarStacksRow,
|
|
163
175
|
colorForSimilarNodes,
|
|
164
176
|
highlightSimilarStacksPreference,
|
|
177
|
+
path,
|
|
178
|
+
highlightSimilarStacksSetLevel,
|
|
179
|
+
highlightSimilarStacksSetName,
|
|
165
180
|
]);
|
|
166
181
|
return (_jsx(_Fragment, { children: _jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [_jsx(ContextMenu, { menuId: MENU_ID, table: table, row: hoveringRow ?? 0, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType, navigateTo: navigateTo, trackVisibility: trackVisibility, curPath: curPath, setCurPath: setCurPath, hideMenu: hideAll, hideBinary: hideBinary }), dockedMetainfo ? (_jsx(DockedGraphTooltip, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType })) : (!isContextMenuOpen && (_jsx(GraphTooltipArrow, { contextElement: svg.current, isContextMenuOpen: isContextMenuOpen, children: _jsx(GraphTooltipArrowContent, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, isFixed: false, total: total, totalUnfiltered: total + filtered, profileType: profileType, navigateTo: navigateTo }) }))), root] }) }));
|
|
167
182
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.378",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@headlessui/react": "^1.7.19",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public",
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "fbab8208a5a08c44a96f81c90bdd69494914c11c"
|
|
75
75
|
}
|
|
@@ -89,6 +89,8 @@ export const getMappingColors = (
|
|
|
89
89
|
return colors;
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
+
const noop = (): void => {};
|
|
93
|
+
|
|
92
94
|
export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
93
95
|
arrow,
|
|
94
96
|
total,
|
|
@@ -214,6 +216,18 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
|
214
216
|
setBinaryFrameFilter(newMappingsList);
|
|
215
217
|
};
|
|
216
218
|
|
|
219
|
+
const highlightSimilarStacksName = highlightSimilarStacksPreference ? hoveringName : null;
|
|
220
|
+
const highlightSimilarStacksSetName = useMemo(() => {
|
|
221
|
+
return highlightSimilarStacksPreference ? setHoveringName : noop;
|
|
222
|
+
}, [highlightSimilarStacksPreference]);
|
|
223
|
+
const highlightSimilarStacksSetLevel = useMemo(() => {
|
|
224
|
+
return highlightSimilarStacksPreference ? setHoveringLevel : noop;
|
|
225
|
+
}, [highlightSimilarStacksPreference]);
|
|
226
|
+
const highlightSimilarStacksRow = highlightSimilarStacksPreference ? hoveringRow : null;
|
|
227
|
+
const path = useMemo(() => {
|
|
228
|
+
return [];
|
|
229
|
+
}, []);
|
|
230
|
+
|
|
217
231
|
// useMemo for the root graph as it otherwise renders the whole graph if the hoveringRow changes.
|
|
218
232
|
const root = useMemo(() => {
|
|
219
233
|
return (
|
|
@@ -239,20 +253,20 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
|
239
253
|
curPath={curPath}
|
|
240
254
|
total={total}
|
|
241
255
|
xScale={xScale}
|
|
242
|
-
path={
|
|
256
|
+
path={path}
|
|
243
257
|
level={0}
|
|
244
258
|
isRoot={true}
|
|
245
259
|
searchString={currentSearchString}
|
|
246
260
|
setHoveringRow={setHoveringRow}
|
|
247
|
-
setHoveringLevel={
|
|
261
|
+
setHoveringLevel={highlightSimilarStacksSetLevel}
|
|
248
262
|
sortBy={sortBy}
|
|
249
263
|
darkMode={isDarkMode}
|
|
250
264
|
compareMode={compareMode}
|
|
251
265
|
profileType={profileType}
|
|
252
266
|
isContextMenuOpen={isContextMenuOpen}
|
|
253
|
-
hoveringName={
|
|
254
|
-
setHoveringName={
|
|
255
|
-
hoveringRow={
|
|
267
|
+
hoveringName={highlightSimilarStacksName}
|
|
268
|
+
setHoveringName={highlightSimilarStacksSetName}
|
|
269
|
+
hoveringRow={highlightSimilarStacksRow}
|
|
256
270
|
colorForSimilarNodes={colorForSimilarNodes}
|
|
257
271
|
highlightSimilarStacksPreference={highlightSimilarStacksPreference}
|
|
258
272
|
/>
|
|
@@ -276,10 +290,13 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
|
276
290
|
compareMode,
|
|
277
291
|
profileType,
|
|
278
292
|
isContextMenuOpen,
|
|
279
|
-
|
|
280
|
-
|
|
293
|
+
highlightSimilarStacksName,
|
|
294
|
+
highlightSimilarStacksRow,
|
|
281
295
|
colorForSimilarNodes,
|
|
282
296
|
highlightSimilarStacksPreference,
|
|
297
|
+
path,
|
|
298
|
+
highlightSimilarStacksSetLevel,
|
|
299
|
+
highlightSimilarStacksSetName,
|
|
283
300
|
]);
|
|
284
301
|
|
|
285
302
|
return (
|