@parca/profile 0.19.142 → 0.19.144
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/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +22 -28
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +72 -73
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +20 -24
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +13 -14
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +6 -5
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +8 -7
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +6 -8
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +48 -55
- package/dist/ProfileSelector/index.d.ts +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +216 -210
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +133 -104
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +24 -25
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +3 -5
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +47 -47
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +1 -2
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +37 -34
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -294
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +7 -8
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +1 -1
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +53 -75
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +36 -44
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +8 -7
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +59 -59
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +37 -22
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +116 -147
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +35 -45
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +6 -5
- package/dist/SourceView/index.d.ts.map +1 -1
- package/dist/SourceView/index.js +6 -4
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +52 -76
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +42 -53
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +15 -19
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +107 -115
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +16 -16
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/TopTable/index.js +112 -127
- package/dist/hooks/urlParsers.d.ts +18 -0
- package/dist/hooks/urlParsers.d.ts.map +1 -0
- package/dist/hooks/urlParsers.js +44 -0
- package/dist/hooks/useColorBy.d.ts +5 -0
- package/dist/hooks/useColorBy.d.ts.map +1 -0
- package/dist/hooks/useColorBy.js +63 -0
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +94 -138
- package/dist/hooks/useDashboardItems.d.ts +5 -0
- package/dist/hooks/useDashboardItems.d.ts.map +1 -0
- package/dist/hooks/useDashboardItems.js +68 -0
- package/dist/hooks/useQueryState.d.ts +4 -4
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +127 -122
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/useQuery.js +2 -1
- package/dist/useSumBy.d.ts +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +2 -2
- package/package.json +4 -3
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +21 -28
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
- package/src/ProfileFlameGraph/index.tsx +6 -9
- package/src/ProfileMetricsGraph/index.tsx +6 -8
- package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
- package/src/ProfileSelector/index.tsx +33 -33
- package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
- package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
- package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
- package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
- package/src/ProfileViewWithData.tsx +29 -35
- package/src/Sandwich/index.tsx +4 -3
- package/src/SourceView/index.tsx +4 -2
- package/src/SourceView/useSelectedLineRange.ts +34 -19
- package/src/Table/MoreDropdown.tsx +9 -11
- package/src/Table/TableContextMenu.tsx +10 -13
- package/src/Table/hooks/useTableConfiguration.tsx +3 -4
- package/src/Table/index.tsx +12 -21
- package/src/TopTable/index.tsx +3 -4
- package/src/hooks/urlParsers.ts +38 -0
- package/src/hooks/useColorBy.ts +42 -0
- package/src/hooks/useCompareModeMeta.ts +61 -91
- package/src/hooks/useDashboardItems.ts +46 -0
- package/src/hooks/useQueryState.test.tsx +275 -345
- package/src/hooks/useQueryState.ts +153 -120
- package/src/index.tsx +16 -15
- package/src/useQuery.tsx +1 -1
- package/src/useSumBy.ts +3 -3
|
@@ -20,13 +20,14 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
20
20
|
|
|
21
21
|
import { useMemo } from 'react';
|
|
22
22
|
import { createColumnHelper } from '@tanstack/table-core';
|
|
23
|
-
import {
|
|
23
|
+
import { useQueryState } from 'nuqs';
|
|
24
24
|
import { valueFormatter } from '@parca/utilities';
|
|
25
|
+
import { tableColumnsParser } from '../../hooks/urlParsers';
|
|
25
26
|
import { ColorCell } from '../ColorCell';
|
|
26
27
|
import { addPlusSign, ratioString } from '../utils/functions';
|
|
27
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
29
|
export function useTableConfiguration(t0) {
|
|
29
|
-
var $ = _c(
|
|
30
|
+
var $ = _c(44);
|
|
30
31
|
var t1 = t0.unit,
|
|
31
32
|
total = t0.total,
|
|
32
33
|
filtered = t0.filtered,
|
|
@@ -40,20 +41,11 @@ export function useTableConfiguration(t0) {
|
|
|
40
41
|
t2 = $[0];
|
|
41
42
|
}
|
|
42
43
|
var columnHelper = t2;
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
alwaysReturnArray: true
|
|
47
|
-
};
|
|
48
|
-
$[1] = t3;
|
|
49
|
-
} else {
|
|
50
|
-
t3 = $[1];
|
|
51
|
-
}
|
|
52
|
-
var _useURLState = useURLState("table_columns", t3),
|
|
53
|
-
_useURLState2 = _slicedToArray(_useURLState, 1),
|
|
54
|
-
tableColumns = _useURLState2[0];
|
|
44
|
+
var _useQueryState = useQueryState("table_columns", tableColumnsParser),
|
|
45
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 1),
|
|
46
|
+
tableColumns = _useQueryState2[0];
|
|
55
47
|
var defaults;
|
|
56
|
-
if ($[
|
|
48
|
+
if ($[1] !== compareMode || $[2] !== tableColumns) {
|
|
57
49
|
defaults = {
|
|
58
50
|
color: true,
|
|
59
51
|
flat: true,
|
|
@@ -74,29 +66,29 @@ export function useTableConfiguration(t0) {
|
|
|
74
66
|
defaults[column] = tableColumns.includes(column);
|
|
75
67
|
});
|
|
76
68
|
}
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
69
|
+
$[1] = compareMode;
|
|
70
|
+
$[2] = tableColumns;
|
|
71
|
+
$[3] = defaults;
|
|
80
72
|
} else {
|
|
81
|
-
defaults = $[
|
|
73
|
+
defaults = $[3];
|
|
82
74
|
}
|
|
83
75
|
var columnVisibility = defaults;
|
|
84
|
-
var
|
|
85
|
-
if ($[
|
|
86
|
-
|
|
76
|
+
var t3;
|
|
77
|
+
if ($[4] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
78
|
+
t3 = columnHelper.accessor("colorProperty", {
|
|
87
79
|
id: "color",
|
|
88
80
|
header: "",
|
|
89
81
|
cell: _temp,
|
|
90
82
|
size: 10,
|
|
91
83
|
enableSorting: false
|
|
92
84
|
});
|
|
93
|
-
$[
|
|
85
|
+
$[4] = t3;
|
|
94
86
|
} else {
|
|
95
|
-
|
|
87
|
+
t3 = $[4];
|
|
96
88
|
}
|
|
97
|
-
var
|
|
98
|
-
if ($[
|
|
99
|
-
|
|
89
|
+
var t4;
|
|
90
|
+
if ($[5] !== unit) {
|
|
91
|
+
t4 = columnHelper.accessor("flat", {
|
|
100
92
|
id: "flat",
|
|
101
93
|
header: "Flat",
|
|
102
94
|
cell: function cell(info_0) {
|
|
@@ -108,14 +100,14 @@ export function useTableConfiguration(t0) {
|
|
|
108
100
|
},
|
|
109
101
|
invertSorting: true
|
|
110
102
|
});
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
103
|
+
$[5] = unit;
|
|
104
|
+
$[6] = t4;
|
|
113
105
|
} else {
|
|
114
|
-
|
|
106
|
+
t4 = $[6];
|
|
115
107
|
}
|
|
116
|
-
var
|
|
117
|
-
if ($[
|
|
118
|
-
|
|
108
|
+
var t5;
|
|
109
|
+
if ($[7] !== filtered || $[8] !== total) {
|
|
110
|
+
t5 = columnHelper.accessor("flat", {
|
|
119
111
|
id: "flatPercentage",
|
|
120
112
|
header: "Flat (%)",
|
|
121
113
|
cell: function cell(info_1) {
|
|
@@ -127,15 +119,15 @@ export function useTableConfiguration(t0) {
|
|
|
127
119
|
},
|
|
128
120
|
invertSorting: true
|
|
129
121
|
});
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
122
|
+
$[7] = filtered;
|
|
123
|
+
$[8] = total;
|
|
124
|
+
$[9] = t5;
|
|
133
125
|
} else {
|
|
134
|
-
|
|
126
|
+
t5 = $[9];
|
|
135
127
|
}
|
|
136
|
-
var
|
|
137
|
-
if ($[
|
|
138
|
-
|
|
128
|
+
var t6;
|
|
129
|
+
if ($[10] !== unit) {
|
|
130
|
+
t6 = columnHelper.accessor("flatDiff", {
|
|
139
131
|
id: "flatDiff",
|
|
140
132
|
header: "Flat Diff",
|
|
141
133
|
cell: function cell(info_2) {
|
|
@@ -147,14 +139,14 @@ export function useTableConfiguration(t0) {
|
|
|
147
139
|
},
|
|
148
140
|
invertSorting: true
|
|
149
141
|
});
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
142
|
+
$[10] = unit;
|
|
143
|
+
$[11] = t6;
|
|
152
144
|
} else {
|
|
153
|
-
|
|
145
|
+
t6 = $[11];
|
|
154
146
|
}
|
|
155
|
-
var
|
|
156
|
-
if ($[
|
|
157
|
-
|
|
147
|
+
var t7;
|
|
148
|
+
if ($[12] !== filtered || $[13] !== total) {
|
|
149
|
+
t7 = columnHelper.accessor("flatDiff", {
|
|
158
150
|
id: "flatDiffPercentage",
|
|
159
151
|
header: "Flat Diff (%)",
|
|
160
152
|
cell: function cell(info_3) {
|
|
@@ -166,15 +158,15 @@ export function useTableConfiguration(t0) {
|
|
|
166
158
|
},
|
|
167
159
|
invertSorting: true
|
|
168
160
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
161
|
+
$[12] = filtered;
|
|
162
|
+
$[13] = total;
|
|
163
|
+
$[14] = t7;
|
|
172
164
|
} else {
|
|
173
|
-
|
|
165
|
+
t7 = $[14];
|
|
174
166
|
}
|
|
175
|
-
var
|
|
176
|
-
if ($[
|
|
177
|
-
|
|
167
|
+
var t8;
|
|
168
|
+
if ($[15] !== unit) {
|
|
169
|
+
t8 = columnHelper.accessor("cumulative", {
|
|
178
170
|
id: "cumulative",
|
|
179
171
|
header: "Cumulative",
|
|
180
172
|
cell: function cell(info_4) {
|
|
@@ -186,14 +178,14 @@ export function useTableConfiguration(t0) {
|
|
|
186
178
|
},
|
|
187
179
|
invertSorting: true
|
|
188
180
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
181
|
+
$[15] = unit;
|
|
182
|
+
$[16] = t8;
|
|
191
183
|
} else {
|
|
192
|
-
|
|
184
|
+
t8 = $[16];
|
|
193
185
|
}
|
|
194
|
-
var
|
|
195
|
-
if ($[
|
|
196
|
-
|
|
186
|
+
var t9;
|
|
187
|
+
if ($[17] !== filtered || $[18] !== total) {
|
|
188
|
+
t9 = columnHelper.accessor("cumulative", {
|
|
197
189
|
id: "cumulativePercentage",
|
|
198
190
|
header: "Cumulative (%)",
|
|
199
191
|
cell: function cell(info_5) {
|
|
@@ -205,15 +197,15 @@ export function useTableConfiguration(t0) {
|
|
|
205
197
|
},
|
|
206
198
|
invertSorting: true
|
|
207
199
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
200
|
+
$[17] = filtered;
|
|
201
|
+
$[18] = total;
|
|
202
|
+
$[19] = t9;
|
|
211
203
|
} else {
|
|
212
|
-
|
|
204
|
+
t9 = $[19];
|
|
213
205
|
}
|
|
214
|
-
var
|
|
215
|
-
if ($[
|
|
216
|
-
|
|
206
|
+
var t10;
|
|
207
|
+
if ($[20] !== unit) {
|
|
208
|
+
t10 = columnHelper.accessor("cumulativeDiff", {
|
|
217
209
|
id: "cumulativeDiff",
|
|
218
210
|
header: "Cumulative Diff",
|
|
219
211
|
cell: function cell(info_6) {
|
|
@@ -225,14 +217,14 @@ export function useTableConfiguration(t0) {
|
|
|
225
217
|
},
|
|
226
218
|
invertSorting: true
|
|
227
219
|
});
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
220
|
+
$[20] = unit;
|
|
221
|
+
$[21] = t10;
|
|
230
222
|
} else {
|
|
231
|
-
|
|
223
|
+
t10 = $[21];
|
|
232
224
|
}
|
|
233
|
-
var
|
|
234
|
-
if ($[
|
|
235
|
-
|
|
225
|
+
var t11;
|
|
226
|
+
if ($[22] !== filtered || $[23] !== total) {
|
|
227
|
+
t11 = columnHelper.accessor("cumulativeDiff", {
|
|
236
228
|
id: "cumulativeDiffPercentage",
|
|
237
229
|
header: "Cumulative Diff (%)",
|
|
238
230
|
cell: function cell(info_7) {
|
|
@@ -244,92 +236,92 @@ export function useTableConfiguration(t0) {
|
|
|
244
236
|
},
|
|
245
237
|
invertSorting: true
|
|
246
238
|
});
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
239
|
+
$[22] = filtered;
|
|
240
|
+
$[23] = total;
|
|
241
|
+
$[24] = t11;
|
|
250
242
|
} else {
|
|
251
|
-
|
|
243
|
+
t11 = $[24];
|
|
252
244
|
}
|
|
245
|
+
var t12;
|
|
253
246
|
var t13;
|
|
254
247
|
var t14;
|
|
255
248
|
var t15;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
t13 = columnHelper.accessor("name", {
|
|
249
|
+
if ($[25] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
250
|
+
t12 = columnHelper.accessor("name", {
|
|
259
251
|
id: "name",
|
|
260
252
|
header: "Name",
|
|
261
253
|
cell: _temp2
|
|
262
254
|
});
|
|
263
|
-
|
|
255
|
+
t13 = columnHelper.accessor("functionSystemName", {
|
|
264
256
|
id: "functionSystemName",
|
|
265
257
|
header: "Function System Name",
|
|
266
258
|
cell: _temp3
|
|
267
259
|
});
|
|
268
|
-
|
|
260
|
+
t14 = columnHelper.accessor("functionFileName", {
|
|
269
261
|
id: "functionFileName",
|
|
270
262
|
header: "Function File Name",
|
|
271
263
|
cell: _temp4
|
|
272
264
|
});
|
|
273
|
-
|
|
265
|
+
t15 = columnHelper.accessor("mappingFile", {
|
|
274
266
|
id: "mappingFile",
|
|
275
267
|
header: "Mapping File",
|
|
276
268
|
cell: _temp5
|
|
277
269
|
});
|
|
270
|
+
$[25] = t12;
|
|
278
271
|
$[26] = t13;
|
|
279
272
|
$[27] = t14;
|
|
280
273
|
$[28] = t15;
|
|
281
|
-
$[29] = t16;
|
|
282
274
|
} else {
|
|
275
|
+
t12 = $[25];
|
|
283
276
|
t13 = $[26];
|
|
284
277
|
t14 = $[27];
|
|
285
278
|
t15 = $[28];
|
|
286
|
-
t16 = $[29];
|
|
287
279
|
}
|
|
288
|
-
var
|
|
289
|
-
if ($[
|
|
290
|
-
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
280
|
+
var t16;
|
|
281
|
+
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t4 || $[32] !== t5 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8 || $[36] !== t9) {
|
|
282
|
+
t16 = [t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15];
|
|
283
|
+
$[29] = t10;
|
|
284
|
+
$[30] = t11;
|
|
285
|
+
$[31] = t4;
|
|
286
|
+
$[32] = t5;
|
|
287
|
+
$[33] = t6;
|
|
288
|
+
$[34] = t7;
|
|
289
|
+
$[35] = t8;
|
|
290
|
+
$[36] = t9;
|
|
291
|
+
$[37] = t16;
|
|
300
292
|
} else {
|
|
301
|
-
|
|
293
|
+
t16 = $[37];
|
|
302
294
|
}
|
|
303
|
-
var baseColumns =
|
|
295
|
+
var baseColumns = t16;
|
|
304
296
|
var columns = baseColumns;
|
|
305
|
-
var
|
|
306
|
-
var
|
|
307
|
-
if ($[
|
|
308
|
-
|
|
309
|
-
id:
|
|
297
|
+
var t17 = compareMode ? "flatDiff" : "flat";
|
|
298
|
+
var t18;
|
|
299
|
+
if ($[38] !== t17) {
|
|
300
|
+
t18 = [{
|
|
301
|
+
id: t17,
|
|
310
302
|
desc: false
|
|
311
303
|
}];
|
|
304
|
+
$[38] = t17;
|
|
312
305
|
$[39] = t18;
|
|
313
|
-
$[40] = t19;
|
|
314
306
|
} else {
|
|
315
|
-
|
|
307
|
+
t18 = $[39];
|
|
316
308
|
}
|
|
317
|
-
var initialSorting =
|
|
318
|
-
var
|
|
319
|
-
if ($[
|
|
320
|
-
|
|
309
|
+
var initialSorting = t18;
|
|
310
|
+
var t19;
|
|
311
|
+
if ($[40] !== columnVisibility || $[41] !== columns || $[42] !== initialSorting) {
|
|
312
|
+
t19 = {
|
|
321
313
|
columns: columns,
|
|
322
314
|
initialSorting: initialSorting,
|
|
323
315
|
columnVisibility: columnVisibility
|
|
324
316
|
};
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
317
|
+
$[40] = columnVisibility;
|
|
318
|
+
$[41] = columns;
|
|
319
|
+
$[42] = initialSorting;
|
|
320
|
+
$[43] = t19;
|
|
329
321
|
} else {
|
|
330
|
-
|
|
322
|
+
t19 = $[43];
|
|
331
323
|
}
|
|
332
|
-
return
|
|
324
|
+
return t19;
|
|
333
325
|
}
|
|
334
326
|
function _temp5(info_11) {
|
|
335
327
|
return info_11.getValue();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAErE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAErE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAQlD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAa1C,OAAO,EAAC,OAAO,EAAmC,MAAM,mBAAmB,CAAC;AAE5E,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAC7D,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,wCAiMhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/dist/Table/index.js
CHANGED
|
@@ -20,11 +20,15 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
20
20
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
21
21
|
import { tableFromIPC } from '@uwdata/flechette';
|
|
22
22
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
23
|
+
import { useQueryState } from 'nuqs';
|
|
23
24
|
import { useContextMenu } from 'react-contexify';
|
|
24
|
-
import { Table as TableComponent, TableSkeleton, useParcaContext
|
|
25
|
+
import { Table as TableComponent, TableSkeleton, useParcaContext } from '@parca/components';
|
|
25
26
|
import { useCurrentColorProfile } from '@parca/hooks';
|
|
26
27
|
import useMappingList, { useFilenamesList } from '../ProfileFlameGraph/FlameGraphArrow/useMappingList';
|
|
27
28
|
import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
|
|
29
|
+
import { stringParam } from '../hooks/urlParsers';
|
|
30
|
+
import { useColorBy } from '../hooks/useColorBy';
|
|
31
|
+
import { useDashboardItems } from '../hooks/useDashboardItems';
|
|
28
32
|
import { alignedUint8Array } from '../utils';
|
|
29
33
|
import TableContextMenuWrapper from './TableContextMenuWrapper';
|
|
30
34
|
import { useColorManagement } from './hooks/useColorManagement';
|
|
@@ -53,19 +57,15 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
|
|
|
53
57
|
metadataMappingFiles = _ref.metadataMappingFiles,
|
|
54
58
|
error = _ref.error;
|
|
55
59
|
var currentColorProfile = useCurrentColorProfile();
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var _useURLState5 = useURLState('color_by'),
|
|
66
|
-
_useURLState6 = _slicedToArray(_useURLState5, 2),
|
|
67
|
-
colorBy = _useURLState6[0],
|
|
68
|
-
setColorBy = _useURLState6[1];
|
|
60
|
+
var _useDashboardItems = useDashboardItems(),
|
|
61
|
+
dashboardItems = _useDashboardItems.dashboardItems;
|
|
62
|
+
var _useQueryState = useQueryState('sandwich_function_name', stringParam),
|
|
63
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
64
|
+
_ = _useQueryState2[0],
|
|
65
|
+
setSandwichFunctionName = _useQueryState2[1];
|
|
66
|
+
var _useColorBy = useColorBy(),
|
|
67
|
+
colorBy = _useColorBy.colorBy,
|
|
68
|
+
setColorBy = _useColorBy.setColorBy;
|
|
69
69
|
var _useParcaContext = useParcaContext(),
|
|
70
70
|
isDarkMode = _useParcaContext.isDarkMode;
|
|
71
71
|
var _useProfileViewContex = useProfileViewContext(),
|
|
@@ -95,7 +95,7 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
|
|
|
95
95
|
// If there is only one mapping file, we want to color by filename by default.
|
|
96
96
|
useEffect(function () {
|
|
97
97
|
if (mappingsListCount === 1 && colorBy !== 'filename') {
|
|
98
|
-
setColorBy('filename');
|
|
98
|
+
void setColorBy('filename');
|
|
99
99
|
}
|
|
100
100
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
101
101
|
}, [mappingsListCount]);
|
|
@@ -122,7 +122,7 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
|
|
|
122
122
|
columnVisibility = tableConfig.columnVisibility;
|
|
123
123
|
var selectSpan = useCallback(function (span) {
|
|
124
124
|
if (!dashboardItems.includes('flamegraph')) {
|
|
125
|
-
setSandwichFunctionName(span.trim());
|
|
125
|
+
void setSandwichFunctionName(span.trim());
|
|
126
126
|
}
|
|
127
127
|
}, [setSandwichFunctionName, dashboardItems]);
|
|
128
128
|
var onRowClick = useCallback(function (row) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TopTable/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAC,GAAG,EAAW,WAAW,EAAC,MAAM,eAAe,CAAC;AAExD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TopTable/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAC,GAAG,EAAW,WAAW,EAAC,MAAM,eAAe,CAAC;AAExD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAM1B,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,QAAQ,GAAI,MAAM,WAAW,GAAG,SAAS,KAAG,MAcxD,CAAC;AAYF,eAAO,MAAM,QAAQ,2CA0KnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|