@parca/profile 0.16.212 → 0.16.214

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,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.214 (2023-07-20)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.16.213](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.212...@parca/profile@0.16.213) (2023-07-18)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## 0.16.212 (2023-07-18)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -1,4 +1,4 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Copyright 2022 The Parca Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -107,9 +107,26 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ table, total, f
107
107
  }
108
108
  return scaleLinear([0n, total], [0, width]);
109
109
  }, [total, width]);
110
+ // useMemo for the root graph as it otherwise renders the whole graph if the hoveringRow changes.
111
+ const root = useMemo(() => {
112
+ return (_jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, 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: [], level: 0, isRoot: true, searchString: currentSearchString, setHoveringRow: setHoveringRow, sortBy: sortBy, darkMode: isDarkMode, compareMode: compareMode }) }) }) }));
113
+ }, [
114
+ compareMode,
115
+ curPath,
116
+ currentSearchString,
117
+ height,
118
+ isDarkMode,
119
+ mappingColors,
120
+ setCurPath,
121
+ sortBy,
122
+ table,
123
+ total,
124
+ width,
125
+ xScale,
126
+ ]);
110
127
  if (table.numRows === 0 || width === undefined) {
111
128
  return _jsx(_Fragment, {});
112
129
  }
113
- return (_jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [_jsx(ColorStackLegend, { mappingColors: mappingColors, navigateTo: navigateTo, compareMode: compareMode }), _jsx(GraphTooltipArrow, { contextElement: svg.current, children: _jsx(GraphTooltipArrowContent, { table: table, row: hoveringRow, isFixed: false, total: total, totalUnfiltered: total + filtered, unit: sampleUnit }) }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, 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, height: RowHeight, setCurPath: setCurPath, curPath: curPath, total: total, xScale: xScale, path: [], level: 0, isRoot: true, searchString: currentSearchString, setHoveringRow: setHoveringRow, sortBy: sortBy, darkMode: isDarkMode, compareMode: compareMode }) }) }) })] }));
130
+ return (_jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [_jsx(ColorStackLegend, { mappingColors: mappingColors, navigateTo: navigateTo, compareMode: compareMode }), _jsx(GraphTooltipArrow, { contextElement: svg.current, children: _jsx(GraphTooltipArrowContent, { table: table, row: hoveringRow, isFixed: false, total: total, totalUnfiltered: total + filtered, unit: sampleUnit }) }), root] }));
114
131
  });
115
132
  export default IcicleGraphArrow;
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.212",
3
+ "version": "0.16.214",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.80",
7
- "@parca/components": "^0.16.170",
7
+ "@parca/components": "^0.16.171",
8
8
  "@parca/dynamicsize": "^0.16.54",
9
9
  "@parca/hooks": "^0.0.15",
10
10
  "@parca/parser": "^0.16.55",
11
- "@parca/store": "^0.16.92",
12
- "@parca/utilities": "^0.0.21",
11
+ "@parca/store": "^0.16.93",
12
+ "@parca/utilities": "^0.0.22",
13
13
  "@tanstack/react-query": "^4.0.5",
14
14
  "@types/react-beautiful-dnd": "^13.1.3",
15
15
  "apache-arrow": "^12.0.0",
@@ -47,5 +47,5 @@
47
47
  "access": "public",
48
48
  "registry": "https://registry.npmjs.org/"
49
49
  },
50
- "gitHead": "e4dfde14a39afad5ffc6c2823fd1ed9963a50aa9"
50
+ "gitHead": "f922df8580dc8751f98219157b3c0152332ebb5d"
51
51
  }
@@ -160,27 +160,9 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
160
160
  return scaleLinear([0n, total], [0, width]);
161
161
  }, [total, width]);
162
162
 
163
- if (table.numRows === 0 || width === undefined) {
164
- return <></>;
165
- }
166
-
167
- return (
168
- <div onMouseLeave={() => dispatch(setHoveringNode(undefined))}>
169
- <ColorStackLegend
170
- mappingColors={mappingColors}
171
- navigateTo={navigateTo}
172
- compareMode={compareMode}
173
- />
174
- <GraphTooltipArrow contextElement={svg.current}>
175
- <GraphTooltipArrowContent
176
- table={table}
177
- row={hoveringRow}
178
- isFixed={false}
179
- total={total}
180
- totalUnfiltered={total + filtered}
181
- unit={sampleUnit}
182
- />
183
- </GraphTooltipArrow>
163
+ // useMemo for the root graph as it otherwise renders the whole graph if the hoveringRow changes.
164
+ const root = useMemo(() => {
165
+ return (
184
166
  <svg
185
167
  className="font-robotoMono"
186
168
  width={width}
@@ -196,7 +178,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
196
178
  mappingColors={mappingColors}
197
179
  x={0}
198
180
  y={0}
199
- totalWidth={width}
181
+ totalWidth={width ?? 1}
200
182
  height={RowHeight}
201
183
  setCurPath={setCurPath}
202
184
  curPath={curPath}
@@ -214,6 +196,44 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
214
196
  </g>
215
197
  </g>
216
198
  </svg>
199
+ );
200
+ }, [
201
+ compareMode,
202
+ curPath,
203
+ currentSearchString,
204
+ height,
205
+ isDarkMode,
206
+ mappingColors,
207
+ setCurPath,
208
+ sortBy,
209
+ table,
210
+ total,
211
+ width,
212
+ xScale,
213
+ ]);
214
+
215
+ if (table.numRows === 0 || width === undefined) {
216
+ return <></>;
217
+ }
218
+
219
+ return (
220
+ <div onMouseLeave={() => dispatch(setHoveringNode(undefined))}>
221
+ <ColorStackLegend
222
+ mappingColors={mappingColors}
223
+ navigateTo={navigateTo}
224
+ compareMode={compareMode}
225
+ />
226
+ <GraphTooltipArrow contextElement={svg.current}>
227
+ <GraphTooltipArrowContent
228
+ table={table}
229
+ row={hoveringRow}
230
+ isFixed={false}
231
+ total={total}
232
+ totalUnfiltered={total + filtered}
233
+ unit={sampleUnit}
234
+ />
235
+ </GraphTooltipArrow>
236
+ {root}
217
237
  </div>
218
238
  );
219
239
  });