@parca/profile 0.17.4 → 0.17.6
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/ProfileExplorer/index.d.ts.map +1 -1
- package/dist/ProfileExplorer/index.js +16 -19
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js +7 -2
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +12 -1
- package/package.json +6 -6
- package/src/ProfileExplorer/index.tsx +23 -19
- package/src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx +7 -2
- package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +12 -1
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.17.6](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.5...@parca/profile@0.17.6) (2025-06-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.17.5](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.4...@parca/profile@0.17.5) (2025-06-03)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.17.4](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.3...@parca/profile@0.17.4) (2025-06-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAQ1B,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,eAAgB,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAmWF,QAAA,MAAM,eAAe,8CAIlB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -15,7 +15,7 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
15
15
|
import { Provider } from 'react-redux';
|
|
16
16
|
import { DateTimeRange, KeyDownProvider, useParcaContext } from '@parca/components';
|
|
17
17
|
import { createStore } from '@parca/store';
|
|
18
|
-
import { capitalizeOnlyFirstLetter } from '@parca/utilities';
|
|
18
|
+
import { capitalizeOnlyFirstLetter, decodeMultipleEncodings, isUrlEncoded, } from '@parca/utilities';
|
|
19
19
|
import { ProfileSelectionFromParams, SuffixParams } from '..';
|
|
20
20
|
import { useProfileTypes } from '../ProfileSelector';
|
|
21
21
|
import { sumByToParam, useSumByFromParams } from '../useSumBy';
|
|
@@ -55,10 +55,12 @@ const filterSuffix = (o, suffix) => Object.fromEntries(Object.entries(o)
|
|
|
55
55
|
.filter(([key]) => !key.endsWith(suffix))
|
|
56
56
|
.map(([key, value]) => {
|
|
57
57
|
if (typeof value === 'string') {
|
|
58
|
-
|
|
58
|
+
// Only encode if not already encoded
|
|
59
|
+
return [key, isUrlEncoded(value) ? value : encodeURIComponent(value)];
|
|
59
60
|
}
|
|
60
61
|
if (Array.isArray(value)) {
|
|
61
|
-
|
|
62
|
+
// Only encode array values if not already encoded
|
|
63
|
+
return [key, value.map(v => (isUrlEncoded(v) ? v : encodeURIComponent(v)))];
|
|
62
64
|
}
|
|
63
65
|
return [key, value];
|
|
64
66
|
}));
|
|
@@ -124,14 +126,10 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
124
126
|
from_a = sanitizedRange.from_a;
|
|
125
127
|
to_a = sanitizedRange.to_a;
|
|
126
128
|
if ((queryParams?.expression_a ?? '') !== '')
|
|
127
|
-
queryParams.expression_a = expression_a;
|
|
129
|
+
queryParams.expression_a = decodeMultipleEncodings(expression_a);
|
|
128
130
|
if ((queryParams?.expression_b ?? '') !== '')
|
|
129
|
-
queryParams.expression_b = expression_b;
|
|
131
|
+
queryParams.expression_b = decodeMultipleEncodings(expression_b);
|
|
130
132
|
const selectProfile = (p, suffix) => {
|
|
131
|
-
queryParams.expression_a = encodeURIComponent(queryParams.expression_a);
|
|
132
|
-
queryParams.selection_a = encodeURIComponent(queryParams.selection_a);
|
|
133
|
-
queryParams.expression_b = encodeURIComponent(queryParams.expression_b);
|
|
134
|
-
queryParams.selection_b = encodeURIComponent(queryParams.selection_b);
|
|
135
133
|
return navigateTo('/', {
|
|
136
134
|
...queryParams,
|
|
137
135
|
...SuffixParams(p.HistoryParams(), suffix),
|
|
@@ -157,7 +155,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
157
155
|
? {
|
|
158
156
|
merge_from_a: q.mergeFrom,
|
|
159
157
|
merge_to_a: q.mergeTo,
|
|
160
|
-
selection_a:
|
|
158
|
+
selection_a: q.expression,
|
|
161
159
|
}
|
|
162
160
|
: {};
|
|
163
161
|
return navigateTo('/',
|
|
@@ -166,7 +164,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
166
164
|
filterEmptyParams({
|
|
167
165
|
...filterSuffix(queryParams, '_a'),
|
|
168
166
|
...{
|
|
169
|
-
expression_a:
|
|
167
|
+
expression_a: q.expression,
|
|
170
168
|
from_a: q.from.toString(),
|
|
171
169
|
to_a: q.to.toString(),
|
|
172
170
|
time_selection_a: q.timeSelection,
|
|
@@ -176,7 +174,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
176
174
|
}));
|
|
177
175
|
};
|
|
178
176
|
const selectProfile = (p) => {
|
|
179
|
-
queryParams.expression_a = encodeURIComponent(queryParams.expression_a);
|
|
180
177
|
return navigateTo('/', {
|
|
181
178
|
...queryParams,
|
|
182
179
|
...SuffixParams(p.HistoryParams(), '_a'),
|
|
@@ -206,9 +203,9 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
206
203
|
...filterSuffix(queryParams, '_a'),
|
|
207
204
|
...{
|
|
208
205
|
compare_a: 'true',
|
|
209
|
-
expression_a:
|
|
210
|
-
expression_b
|
|
211
|
-
selection_b
|
|
206
|
+
expression_a: q.expression,
|
|
207
|
+
expression_b,
|
|
208
|
+
selection_b,
|
|
212
209
|
from_a: q.from.toString(),
|
|
213
210
|
to_a: q.to.toString(),
|
|
214
211
|
time_selection_a: q.timeSelection,
|
|
@@ -223,7 +220,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
223
220
|
? {
|
|
224
221
|
merge_from_b: q.mergeFrom,
|
|
225
222
|
merge_to_b: q.mergeTo,
|
|
226
|
-
selection_b:
|
|
223
|
+
selection_b: q.expression,
|
|
227
224
|
}
|
|
228
225
|
: {};
|
|
229
226
|
return navigateTo('/',
|
|
@@ -233,9 +230,9 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
233
230
|
...filterSuffix(queryParams, '_b'),
|
|
234
231
|
...{
|
|
235
232
|
compare_b: 'true',
|
|
236
|
-
expression_b:
|
|
237
|
-
expression_a
|
|
238
|
-
selection_a
|
|
233
|
+
expression_b: q.expression,
|
|
234
|
+
expression_a,
|
|
235
|
+
selection_a,
|
|
239
236
|
from_b: q.from.toString(),
|
|
240
237
|
to_b: q.to.toString(),
|
|
241
238
|
time_selection_b: q.timeSelection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IcicleGraphNodes.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAErC,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,yCAAyC,CAAC;AAIjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAgBlD,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAG7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS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D;AAED,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AACF,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,UAAU,6CAiLrB,CAAC"}
|
|
@@ -47,7 +47,9 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
|
|
|
47
47
|
const diff = diffColumn?.get(row) !== null ? BigInt(diffColumn?.get(row)) : null;
|
|
48
48
|
const filename = arrowToString(filenameColumn?.get(row));
|
|
49
49
|
const depth = depthColumn?.get(row) ?? 0;
|
|
50
|
-
const valueOffset = valueOffsetColumn?.get(row) !== null
|
|
50
|
+
const valueOffset = valueOffsetColumn?.get(row) !== null && valueOffsetColumn?.get(row) !== undefined
|
|
51
|
+
? BigInt(valueOffsetColumn?.get(row))
|
|
52
|
+
: 0n;
|
|
51
53
|
const colorAttribute = colorBy === 'filename' ? filename : colorBy === 'binary' ? mappingFile : null;
|
|
52
54
|
const colorsMap = colors;
|
|
53
55
|
const hoveringName = hoveringRow !== undefined ? arrowToString(functionNameColumn?.get(hoveringRow)) : '';
|
|
@@ -70,7 +72,10 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
|
|
|
70
72
|
}
|
|
71
73
|
return { isHighlightEnabled: true, isHighlighted: isSearchMatch(searchString, name) };
|
|
72
74
|
}, [searchString, name]);
|
|
73
|
-
const selectionOffset = valueOffsetColumn?.get(selectedRow) !== null
|
|
75
|
+
const selectionOffset = valueOffsetColumn?.get(selectedRow) !== null &&
|
|
76
|
+
valueOffsetColumn?.get(selectedRow) !== undefined
|
|
77
|
+
? BigInt(valueOffsetColumn?.get(selectedRow))
|
|
78
|
+
: 0n;
|
|
74
79
|
const selectionCumulative = cumulativeColumn?.get(selectedRow) !== null ? BigInt(cumulativeColumn?.get(selectedRow)) : 0n;
|
|
75
80
|
if (valueOffset + cumulative <= selectionOffset ||
|
|
76
81
|
valueOffset >= selectionOffset + selectionCumulative) {
|
|
@@ -1 +1 @@
|
|
|
1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,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,cACX,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAeF,eAAO,MAAM,gBAAgB,mDA8N3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -63,6 +63,17 @@ export const getFilenameColors = (filenamesList, isDarkMode, currentColorProfile
|
|
|
63
63
|
return colors;
|
|
64
64
|
};
|
|
65
65
|
const noop = () => { };
|
|
66
|
+
function getMaxDepth(depthColumn) {
|
|
67
|
+
if (depthColumn === null)
|
|
68
|
+
return 0;
|
|
69
|
+
let max = 0;
|
|
70
|
+
for (const val of depthColumn) {
|
|
71
|
+
const numVal = Number(val);
|
|
72
|
+
if (numVal > max)
|
|
73
|
+
max = numVal;
|
|
74
|
+
}
|
|
75
|
+
return max;
|
|
76
|
+
}
|
|
66
77
|
export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, profileSource, mappingsListFromMetadata, compareAbsolute, isIcicleChart = false, }) {
|
|
67
78
|
const [highlightSimilarStacksPreference] = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key);
|
|
68
79
|
const [hoveringRow, setHoveringRow] = useState(undefined);
|
|
@@ -155,7 +166,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
|
|
|
155
166
|
setCurPath(path);
|
|
156
167
|
};
|
|
157
168
|
const depthColumn = table.getChild(FIELD_DEPTH);
|
|
158
|
-
const maxDepth =
|
|
169
|
+
const maxDepth = getMaxDepth(depthColumn);
|
|
159
170
|
const height = maxDepth * RowHeight;
|
|
160
171
|
// To find the selected row, we must walk the current path and look at which
|
|
161
172
|
// children of the current frame matches the path element exactly. Until the
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
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.129",
|
|
9
|
-
"@parca/components": "0.16.
|
|
9
|
+
"@parca/components": "0.16.338",
|
|
10
10
|
"@parca/dynamicsize": "0.16.65",
|
|
11
|
-
"@parca/hooks": "0.0.
|
|
11
|
+
"@parca/hooks": "0.0.88",
|
|
12
12
|
"@parca/icons": "0.16.71",
|
|
13
13
|
"@parca/parser": "0.16.78",
|
|
14
|
-
"@parca/store": "0.16.
|
|
15
|
-
"@parca/utilities": "0.0.
|
|
14
|
+
"@parca/store": "0.16.173",
|
|
15
|
+
"@parca/utilities": "0.0.98",
|
|
16
16
|
"@popperjs/core": "^2.11.8",
|
|
17
17
|
"@protobuf-ts/runtime-rpc": "^2.5.0",
|
|
18
18
|
"@storybook/preview-api": "^8.4.3",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public",
|
|
78
78
|
"registry": "https://registry.npmjs.org/"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "57a6cd95c786690c9cdd0daaf9206df1bcf8d32e"
|
|
81
81
|
}
|
|
@@ -18,7 +18,12 @@ import {Provider} from 'react-redux';
|
|
|
18
18
|
import {QueryServiceClient} from '@parca/client';
|
|
19
19
|
import {DateTimeRange, KeyDownProvider, useParcaContext} from '@parca/components';
|
|
20
20
|
import {createStore} from '@parca/store';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
capitalizeOnlyFirstLetter,
|
|
23
|
+
decodeMultipleEncodings,
|
|
24
|
+
isUrlEncoded,
|
|
25
|
+
type NavigateFunction,
|
|
26
|
+
} from '@parca/utilities';
|
|
22
27
|
|
|
23
28
|
import {ProfileSelection, ProfileSelectionFromParams, SuffixParams} from '..';
|
|
24
29
|
import {QuerySelection, useProfileTypes} from '../ProfileSelector';
|
|
@@ -91,10 +96,12 @@ const filterSuffix = (
|
|
|
91
96
|
.filter(([key]) => !key.endsWith(suffix))
|
|
92
97
|
.map(([key, value]) => {
|
|
93
98
|
if (typeof value === 'string') {
|
|
94
|
-
|
|
99
|
+
// Only encode if not already encoded
|
|
100
|
+
return [key, isUrlEncoded(value) ? value : encodeURIComponent(value)];
|
|
95
101
|
}
|
|
96
102
|
if (Array.isArray(value)) {
|
|
97
|
-
|
|
103
|
+
// Only encode array values if not already encoded
|
|
104
|
+
return [key, value.map(v => (isUrlEncoded(v) ? v : encodeURIComponent(v)))];
|
|
98
105
|
}
|
|
99
106
|
return [key, value];
|
|
100
107
|
})
|
|
@@ -220,14 +227,12 @@ const ProfileExplorerApp = ({
|
|
|
220
227
|
from_a = sanitizedRange.from_a;
|
|
221
228
|
to_a = sanitizedRange.to_a;
|
|
222
229
|
|
|
223
|
-
if ((queryParams?.expression_a ?? '') !== '')
|
|
224
|
-
|
|
230
|
+
if ((queryParams?.expression_a ?? '') !== '')
|
|
231
|
+
queryParams.expression_a = decodeMultipleEncodings(expression_a);
|
|
232
|
+
if ((queryParams?.expression_b ?? '') !== '')
|
|
233
|
+
queryParams.expression_b = decodeMultipleEncodings(expression_b);
|
|
225
234
|
|
|
226
235
|
const selectProfile = (p: ProfileSelection, suffix: string): void => {
|
|
227
|
-
queryParams.expression_a = encodeURIComponent(queryParams.expression_a);
|
|
228
|
-
queryParams.selection_a = encodeURIComponent(queryParams.selection_a);
|
|
229
|
-
queryParams.expression_b = encodeURIComponent(queryParams.expression_b);
|
|
230
|
-
queryParams.selection_b = encodeURIComponent(queryParams.selection_b);
|
|
231
236
|
return navigateTo('/', {
|
|
232
237
|
...queryParams,
|
|
233
238
|
...SuffixParams(p.HistoryParams(), suffix),
|
|
@@ -258,7 +263,7 @@ const ProfileExplorerApp = ({
|
|
|
258
263
|
? {
|
|
259
264
|
merge_from_a: q.mergeFrom,
|
|
260
265
|
merge_to_a: q.mergeTo,
|
|
261
|
-
selection_a:
|
|
266
|
+
selection_a: q.expression,
|
|
262
267
|
}
|
|
263
268
|
: {};
|
|
264
269
|
return navigateTo(
|
|
@@ -268,7 +273,7 @@ const ProfileExplorerApp = ({
|
|
|
268
273
|
filterEmptyParams({
|
|
269
274
|
...filterSuffix(queryParams, '_a'),
|
|
270
275
|
...{
|
|
271
|
-
expression_a:
|
|
276
|
+
expression_a: q.expression,
|
|
272
277
|
from_a: q.from.toString(),
|
|
273
278
|
to_a: q.to.toString(),
|
|
274
279
|
time_selection_a: q.timeSelection,
|
|
@@ -280,7 +285,6 @@ const ProfileExplorerApp = ({
|
|
|
280
285
|
};
|
|
281
286
|
|
|
282
287
|
const selectProfile = (p: ProfileSelection): void => {
|
|
283
|
-
queryParams.expression_a = encodeURIComponent(queryParams.expression_a);
|
|
284
288
|
return navigateTo('/', {
|
|
285
289
|
...queryParams,
|
|
286
290
|
...SuffixParams(p.HistoryParams(), '_a'),
|
|
@@ -324,9 +328,9 @@ const ProfileExplorerApp = ({
|
|
|
324
328
|
...filterSuffix(queryParams, '_a'),
|
|
325
329
|
...{
|
|
326
330
|
compare_a: 'true',
|
|
327
|
-
expression_a:
|
|
328
|
-
expression_b
|
|
329
|
-
selection_b
|
|
331
|
+
expression_a: q.expression,
|
|
332
|
+
expression_b,
|
|
333
|
+
selection_b,
|
|
330
334
|
from_a: q.from.toString(),
|
|
331
335
|
to_a: q.to.toString(),
|
|
332
336
|
time_selection_a: q.timeSelection,
|
|
@@ -344,7 +348,7 @@ const ProfileExplorerApp = ({
|
|
|
344
348
|
? {
|
|
345
349
|
merge_from_b: q.mergeFrom,
|
|
346
350
|
merge_to_b: q.mergeTo,
|
|
347
|
-
selection_b:
|
|
351
|
+
selection_b: q.expression,
|
|
348
352
|
}
|
|
349
353
|
: {};
|
|
350
354
|
return navigateTo(
|
|
@@ -355,9 +359,9 @@ const ProfileExplorerApp = ({
|
|
|
355
359
|
...filterSuffix(queryParams, '_b'),
|
|
356
360
|
...{
|
|
357
361
|
compare_b: 'true',
|
|
358
|
-
expression_b:
|
|
359
|
-
expression_a
|
|
360
|
-
selection_a
|
|
362
|
+
expression_b: q.expression,
|
|
363
|
+
expression_a,
|
|
364
|
+
selection_a,
|
|
361
365
|
from_b: q.from.toString(),
|
|
362
366
|
to_b: q.to.toString(),
|
|
363
367
|
time_selection_b: q.timeSelection,
|
|
@@ -114,7 +114,9 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
|
|
|
114
114
|
const filename: string | null = arrowToString(filenameColumn?.get(row));
|
|
115
115
|
const depth: number = depthColumn?.get(row) ?? 0;
|
|
116
116
|
const valueOffset: bigint =
|
|
117
|
-
valueOffsetColumn?.get(row) !== null
|
|
117
|
+
valueOffsetColumn?.get(row) !== null && valueOffsetColumn?.get(row) !== undefined
|
|
118
|
+
? BigInt(valueOffsetColumn?.get(row))
|
|
119
|
+
: 0n;
|
|
118
120
|
|
|
119
121
|
const colorAttribute =
|
|
120
122
|
colorBy === 'filename' ? filename : colorBy === 'binary' ? mappingFile : null;
|
|
@@ -147,7 +149,10 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
|
|
|
147
149
|
}, [searchString, name]);
|
|
148
150
|
|
|
149
151
|
const selectionOffset =
|
|
150
|
-
valueOffsetColumn?.get(selectedRow) !== null
|
|
152
|
+
valueOffsetColumn?.get(selectedRow) !== null &&
|
|
153
|
+
valueOffsetColumn?.get(selectedRow) !== undefined
|
|
154
|
+
? BigInt(valueOffsetColumn?.get(selectedRow))
|
|
155
|
+
: 0n;
|
|
151
156
|
const selectionCumulative =
|
|
152
157
|
cumulativeColumn?.get(selectedRow) !== null ? BigInt(cumulativeColumn?.get(selectedRow)) : 0n;
|
|
153
158
|
if (
|
|
@@ -106,6 +106,17 @@ export const getFilenameColors = (
|
|
|
106
106
|
|
|
107
107
|
const noop = (): void => {};
|
|
108
108
|
|
|
109
|
+
function getMaxDepth(depthColumn: Vector<any> | null): number {
|
|
110
|
+
if (depthColumn === null) return 0;
|
|
111
|
+
|
|
112
|
+
let max = 0;
|
|
113
|
+
for (const val of depthColumn) {
|
|
114
|
+
const numVal = Number(val);
|
|
115
|
+
if (numVal > max) max = numVal;
|
|
116
|
+
}
|
|
117
|
+
return max;
|
|
118
|
+
}
|
|
119
|
+
|
|
109
120
|
export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
110
121
|
arrow,
|
|
111
122
|
total,
|
|
@@ -237,7 +248,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
|
|
|
237
248
|
};
|
|
238
249
|
|
|
239
250
|
const depthColumn = table.getChild(FIELD_DEPTH);
|
|
240
|
-
const maxDepth =
|
|
251
|
+
const maxDepth = getMaxDepth(depthColumn);
|
|
241
252
|
const height = maxDepth * RowHeight;
|
|
242
253
|
|
|
243
254
|
// To find the selected row, we must walk the current path and look at which
|