@parca/profile 0.19.142 → 0.19.143
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 +4 -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/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/useSumBy.ts +3 -3
package/dist/TopTable/index.js
CHANGED
|
@@ -4,12 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
7
|
import { c as _c } from "react-compiler-runtime";
|
|
14
8
|
// Copyright 2022 The Parca Authors
|
|
15
9
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -26,9 +20,10 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
26
20
|
|
|
27
21
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
28
22
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
29
|
-
import { Button, Table
|
|
23
|
+
import { Button, Table } from '@parca/components';
|
|
30
24
|
import { getLastItem, isSearchMatch, parseParams, valueFormatter } from '@parca/utilities';
|
|
31
25
|
import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
|
|
26
|
+
import { useDashboardItems } from '../hooks/useDashboardItems';
|
|
32
27
|
import { hexifyAddress } from '../utils';
|
|
33
28
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
29
|
export var RowLabel = function RowLabel(meta) {
|
|
@@ -48,7 +43,7 @@ var addPlusSign = function addPlusSign(num) {
|
|
|
48
43
|
return "+".concat(num);
|
|
49
44
|
};
|
|
50
45
|
export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
51
|
-
var $ = _c(
|
|
46
|
+
var $ = _c(45);
|
|
52
47
|
var top = t0.data,
|
|
53
48
|
unit = t0.sampleUnit,
|
|
54
49
|
navigateTo = t0.navigateTo,
|
|
@@ -64,34 +59,24 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
64
59
|
t1 = $[0];
|
|
65
60
|
}
|
|
66
61
|
var router = t1;
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
t2 = {
|
|
70
|
-
alwaysReturnArray: true
|
|
71
|
-
};
|
|
72
|
-
$[1] = t2;
|
|
73
|
-
} else {
|
|
74
|
-
t2 = $[1];
|
|
75
|
-
}
|
|
76
|
-
var _useURLState = useURLState("dashboard_items", t2),
|
|
77
|
-
_useURLState2 = _slicedToArray(_useURLState, 1),
|
|
78
|
-
dashboardItems = _useURLState2[0];
|
|
62
|
+
var _useDashboardItems = useDashboardItems(),
|
|
63
|
+
dashboardItems = _useDashboardItems.dashboardItems;
|
|
79
64
|
var _useProfileViewContex = useProfileViewContext(),
|
|
80
65
|
compareMode = _useProfileViewContex.compareMode;
|
|
81
|
-
var
|
|
82
|
-
if ($[
|
|
83
|
-
|
|
66
|
+
var t2;
|
|
67
|
+
if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
68
|
+
t2 = columnHelper.accessor("meta", {
|
|
84
69
|
header: _temp,
|
|
85
70
|
cell: _temp2,
|
|
86
71
|
sortingFn: _temp3
|
|
87
72
|
});
|
|
88
|
-
$[
|
|
73
|
+
$[1] = t2;
|
|
89
74
|
} else {
|
|
90
|
-
|
|
75
|
+
t2 = $[1];
|
|
91
76
|
}
|
|
92
|
-
var
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
77
|
+
var t3;
|
|
78
|
+
if ($[2] !== unit) {
|
|
79
|
+
t3 = columnHelper.accessor("flat", {
|
|
95
80
|
header: _temp4,
|
|
96
81
|
cell: function cell(info_0) {
|
|
97
82
|
return valueFormatter(info_0.getValue(), unit, 2);
|
|
@@ -102,14 +87,14 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
102
87
|
},
|
|
103
88
|
sortDescFirst: true
|
|
104
89
|
});
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
90
|
+
$[2] = unit;
|
|
91
|
+
$[3] = t3;
|
|
107
92
|
} else {
|
|
108
|
-
|
|
93
|
+
t3 = $[3];
|
|
109
94
|
}
|
|
110
|
-
var
|
|
111
|
-
if ($[
|
|
112
|
-
|
|
95
|
+
var t4;
|
|
96
|
+
if ($[4] !== unit) {
|
|
97
|
+
t4 = columnHelper.accessor("cumulative", {
|
|
113
98
|
header: _temp5,
|
|
114
99
|
cell: function cell(info_1) {
|
|
115
100
|
return valueFormatter(info_1.getValue(), unit, 2);
|
|
@@ -120,17 +105,17 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
120
105
|
},
|
|
121
106
|
sortDescFirst: true
|
|
122
107
|
});
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
108
|
+
$[4] = unit;
|
|
109
|
+
$[5] = t4;
|
|
125
110
|
} else {
|
|
126
|
-
|
|
111
|
+
t4 = $[5];
|
|
127
112
|
}
|
|
128
113
|
var cols;
|
|
129
|
-
if ($[
|
|
130
|
-
cols = [t3, t4
|
|
114
|
+
if ($[6] !== compareMode || $[7] !== t3 || $[8] !== t4 || $[9] !== unit) {
|
|
115
|
+
cols = [t2, t3, t4];
|
|
131
116
|
if (compareMode) {
|
|
132
117
|
var _t;
|
|
133
|
-
if ($[
|
|
118
|
+
if ($[11] !== unit) {
|
|
134
119
|
_t = columnHelper.accessor("diff", {
|
|
135
120
|
header: _temp6,
|
|
136
121
|
cell: function cell(info_2) {
|
|
@@ -142,25 +127,25 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
142
127
|
},
|
|
143
128
|
sortDescFirst: true
|
|
144
129
|
});
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
130
|
+
$[11] = unit;
|
|
131
|
+
$[12] = _t;
|
|
147
132
|
} else {
|
|
148
|
-
_t = $[
|
|
133
|
+
_t = $[12];
|
|
149
134
|
}
|
|
150
135
|
cols.push(_t);
|
|
151
136
|
}
|
|
152
|
-
$[
|
|
137
|
+
$[6] = compareMode;
|
|
138
|
+
$[7] = t3;
|
|
153
139
|
$[8] = t4;
|
|
154
|
-
$[9] =
|
|
155
|
-
$[10] =
|
|
156
|
-
$[11] = cols;
|
|
140
|
+
$[9] = unit;
|
|
141
|
+
$[10] = cols;
|
|
157
142
|
} else {
|
|
158
|
-
cols = $[
|
|
143
|
+
cols = $[10];
|
|
159
144
|
}
|
|
160
145
|
var columns = cols;
|
|
161
|
-
var
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
146
|
+
var t5;
|
|
147
|
+
if ($[13] !== navigateTo) {
|
|
148
|
+
t5 = function t5(span) {
|
|
164
149
|
if (navigateTo != null) {
|
|
165
150
|
navigateTo("/", _objectSpread(_objectSpread({}, router), {
|
|
166
151
|
search_string: span.trim()
|
|
@@ -169,15 +154,15 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
169
154
|
});
|
|
170
155
|
}
|
|
171
156
|
};
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
157
|
+
$[13] = navigateTo;
|
|
158
|
+
$[14] = t5;
|
|
174
159
|
} else {
|
|
175
|
-
|
|
160
|
+
t5 = $[14];
|
|
176
161
|
}
|
|
177
|
-
var selectSpan =
|
|
178
|
-
var
|
|
179
|
-
if ($[
|
|
180
|
-
|
|
162
|
+
var selectSpan = t5;
|
|
163
|
+
var t6;
|
|
164
|
+
if ($[15] !== dashboardItems.length || $[16] !== selectSpan) {
|
|
165
|
+
t6 = function t6(row) {
|
|
181
166
|
if (dashboardItems.length <= 1) {
|
|
182
167
|
return;
|
|
183
168
|
}
|
|
@@ -188,16 +173,16 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
188
173
|
var name_0 = RowLabel(meta_0);
|
|
189
174
|
selectSpan(name_0);
|
|
190
175
|
};
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
176
|
+
$[15] = dashboardItems.length;
|
|
177
|
+
$[16] = selectSpan;
|
|
178
|
+
$[17] = t6;
|
|
194
179
|
} else {
|
|
195
|
-
|
|
180
|
+
t6 = $[17];
|
|
196
181
|
}
|
|
197
|
-
var onRowClick =
|
|
198
|
-
var
|
|
199
|
-
if ($[
|
|
200
|
-
|
|
182
|
+
var onRowClick = t6;
|
|
183
|
+
var t7;
|
|
184
|
+
if ($[18] !== currentSearchString) {
|
|
185
|
+
t7 = function t7(row_0) {
|
|
201
186
|
var meta_1 = row_0.meta;
|
|
202
187
|
if (meta_1 === undefined) {
|
|
203
188
|
return false;
|
|
@@ -205,16 +190,16 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
205
190
|
var name_1 = RowLabel(meta_1);
|
|
206
191
|
return isSearchMatch(currentSearchString, name_1);
|
|
207
192
|
};
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
193
|
+
$[18] = currentSearchString;
|
|
194
|
+
$[19] = t7;
|
|
210
195
|
} else {
|
|
211
|
-
|
|
196
|
+
t7 = $[19];
|
|
212
197
|
}
|
|
213
|
-
var shouldHighlightRow =
|
|
198
|
+
var shouldHighlightRow = t7;
|
|
214
199
|
var enableHighlighting = currentSearchString != null && (currentSearchString === null || currentSearchString === void 0 ? void 0 : currentSearchString.length) > 0;
|
|
215
|
-
var
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
200
|
+
var t8;
|
|
201
|
+
if ($[20] !== navigateTo) {
|
|
202
|
+
t8 = function t8() {
|
|
218
203
|
if (navigateTo != null) {
|
|
219
204
|
navigateTo("/", _objectSpread(_objectSpread({}, router), {
|
|
220
205
|
search_string: ""
|
|
@@ -223,15 +208,15 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
223
208
|
});
|
|
224
209
|
}
|
|
225
210
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
211
|
+
$[20] = navigateTo;
|
|
212
|
+
$[21] = t8;
|
|
228
213
|
} else {
|
|
229
|
-
|
|
214
|
+
t8 = $[21];
|
|
230
215
|
}
|
|
231
|
-
var clearSelection =
|
|
232
|
-
var
|
|
233
|
-
if ($[
|
|
234
|
-
|
|
216
|
+
var clearSelection = t8;
|
|
217
|
+
var t9;
|
|
218
|
+
if ($[22] !== clearSelection || $[23] !== currentSearchString || $[24] !== dashboardItems.length || $[25] !== setActionButtons) {
|
|
219
|
+
t9 = function t9() {
|
|
235
220
|
if (setActionButtons === undefined) {
|
|
236
221
|
return;
|
|
237
222
|
}
|
|
@@ -247,92 +232,92 @@ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
|
|
|
247
232
|
})
|
|
248
233
|
}) : /*#__PURE__*/_jsx(_Fragment, {}));
|
|
249
234
|
};
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
235
|
+
$[22] = clearSelection;
|
|
236
|
+
$[23] = currentSearchString;
|
|
237
|
+
$[24] = dashboardItems.length;
|
|
238
|
+
$[25] = setActionButtons;
|
|
239
|
+
$[26] = t9;
|
|
255
240
|
} else {
|
|
256
|
-
|
|
241
|
+
t9 = $[26];
|
|
257
242
|
}
|
|
258
|
-
var
|
|
259
|
-
if ($[
|
|
260
|
-
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
243
|
+
var t10;
|
|
244
|
+
if ($[27] !== clearSelection || $[28] !== currentSearchString || $[29] !== dashboardItems || $[30] !== setActionButtons) {
|
|
245
|
+
t10 = [dashboardItems, clearSelection, currentSearchString, setActionButtons];
|
|
246
|
+
$[27] = clearSelection;
|
|
247
|
+
$[28] = currentSearchString;
|
|
248
|
+
$[29] = dashboardItems;
|
|
249
|
+
$[30] = setActionButtons;
|
|
250
|
+
$[31] = t10;
|
|
266
251
|
} else {
|
|
267
|
-
|
|
252
|
+
t10 = $[31];
|
|
268
253
|
}
|
|
269
|
-
useEffect(
|
|
270
|
-
var
|
|
271
|
-
var
|
|
272
|
-
if ($[
|
|
273
|
-
|
|
274
|
-
id:
|
|
254
|
+
useEffect(t9, t10);
|
|
255
|
+
var t11 = compareMode ? "diff" : "cumulative";
|
|
256
|
+
var t12;
|
|
257
|
+
if ($[32] !== t11) {
|
|
258
|
+
t12 = [{
|
|
259
|
+
id: t11,
|
|
275
260
|
desc: true
|
|
276
261
|
}];
|
|
262
|
+
$[32] = t11;
|
|
277
263
|
$[33] = t12;
|
|
278
|
-
$[34] = t13;
|
|
279
264
|
} else {
|
|
280
|
-
|
|
265
|
+
t12 = $[33];
|
|
281
266
|
}
|
|
282
|
-
var initialSorting =
|
|
267
|
+
var initialSorting = t12;
|
|
283
268
|
var total = top != null ? top.list.length : 0;
|
|
284
269
|
if (total === 0 && !loading) {
|
|
285
270
|
var _t2;
|
|
286
|
-
if ($[
|
|
271
|
+
if ($[34] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
287
272
|
_t2 = /*#__PURE__*/_jsx("div", {
|
|
288
273
|
className: "mx-auto text-center",
|
|
289
274
|
children: "Profile has no samples"
|
|
290
275
|
});
|
|
291
|
-
$[
|
|
276
|
+
$[34] = _t2;
|
|
292
277
|
} else {
|
|
293
|
-
_t2 = $[
|
|
278
|
+
_t2 = $[34];
|
|
294
279
|
}
|
|
295
280
|
return _t2;
|
|
296
281
|
}
|
|
297
|
-
var
|
|
298
|
-
if ($[
|
|
282
|
+
var t13;
|
|
283
|
+
if ($[35] !== (top === null || top === void 0 ? void 0 : top.list)) {
|
|
299
284
|
var _top$list;
|
|
300
|
-
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
285
|
+
t13 = (_top$list = top === null || top === void 0 ? void 0 : top.list) !== null && _top$list !== void 0 ? _top$list : [];
|
|
286
|
+
$[35] = top === null || top === void 0 ? void 0 : top.list;
|
|
287
|
+
$[36] = t13;
|
|
303
288
|
} else {
|
|
304
|
-
|
|
289
|
+
t13 = $[36];
|
|
305
290
|
}
|
|
306
|
-
var
|
|
307
|
-
var
|
|
308
|
-
if ($[
|
|
309
|
-
|
|
291
|
+
var t14 = dashboardItems.length > 1;
|
|
292
|
+
var t15;
|
|
293
|
+
if ($[37] !== columns || $[38] !== enableHighlighting || $[39] !== initialSorting || $[40] !== onRowClick || $[41] !== shouldHighlightRow || $[42] !== t13 || $[43] !== t14) {
|
|
294
|
+
t15 = /*#__PURE__*/_jsx("div", {
|
|
310
295
|
className: "relative",
|
|
311
296
|
children: /*#__PURE__*/_jsx("div", {
|
|
312
297
|
className: "font-robotoMono h-[80vh] w-full overflow-scroll",
|
|
313
298
|
children: /*#__PURE__*/_jsx(Table, {
|
|
314
|
-
data:
|
|
299
|
+
data: t13,
|
|
315
300
|
columns: columns,
|
|
316
301
|
initialSorting: initialSorting,
|
|
317
302
|
onRowClick: onRowClick,
|
|
318
303
|
enableHighlighting: enableHighlighting,
|
|
319
304
|
shouldHighlightRow: shouldHighlightRow,
|
|
320
|
-
usePointerCursor:
|
|
305
|
+
usePointerCursor: t14
|
|
321
306
|
})
|
|
322
307
|
})
|
|
323
308
|
});
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
309
|
+
$[37] = columns;
|
|
310
|
+
$[38] = enableHighlighting;
|
|
311
|
+
$[39] = initialSorting;
|
|
312
|
+
$[40] = onRowClick;
|
|
313
|
+
$[41] = shouldHighlightRow;
|
|
314
|
+
$[42] = t13;
|
|
329
315
|
$[43] = t14;
|
|
330
316
|
$[44] = t15;
|
|
331
|
-
$[45] = t16;
|
|
332
317
|
} else {
|
|
333
|
-
|
|
318
|
+
t15 = $[44];
|
|
334
319
|
}
|
|
335
|
-
return
|
|
320
|
+
return t15;
|
|
336
321
|
});
|
|
337
322
|
export default TopTable;
|
|
338
323
|
function _temp() {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createParser } from 'nuqs';
|
|
2
|
+
export declare const stringParam: import("nuqs").SingleParserBuilder<string>;
|
|
3
|
+
export declare const boolParam: import("nuqs").SingleParserBuilder<boolean>;
|
|
4
|
+
export declare const intParam: import("nuqs").SingleParserBuilder<number>;
|
|
5
|
+
export declare const commaArrayParam: import("nuqs").SingleParserBuilder<string[]>;
|
|
6
|
+
export declare const invertCallStackParser: Omit<import("nuqs").SingleParserBuilder<boolean>, "parseServerSide"> & {
|
|
7
|
+
readonly defaultValue: boolean;
|
|
8
|
+
parseServerSide(value: string | string[] | undefined): boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const groupByParser: import("nuqs").SingleParserBuilder<string[]>;
|
|
11
|
+
export declare const flamechartDimensionParser: import("nuqs").SingleParserBuilder<string[]>;
|
|
12
|
+
export declare const tableColumnsParser: import("nuqs").SingleParserBuilder<string[]>;
|
|
13
|
+
export declare const hiddenBinariesParser: Omit<import("nuqs").SingleParserBuilder<string[]>, "parseServerSide"> & {
|
|
14
|
+
readonly defaultValue: string[];
|
|
15
|
+
parseServerSide(value: string | string[] | undefined): string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function jsonParser<T>(): ReturnType<typeof createParser<T>>;
|
|
18
|
+
//# sourceMappingURL=urlParsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlParsers.d.ts","sourceRoot":"","sources":["../../src/hooks/urlParsers.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,YAAY,EAAgE,MAAM,MAAM,CAAC;AAKjG,eAAO,MAAM,WAAW,4CAAkC,CAAC;AAC3D,eAAO,MAAM,SAAS,6CAAmC,CAAC;AAC1D,eAAO,MAAM,QAAQ,4CAAmC,CAAC;AACzD,eAAO,MAAM,eAAe,8CAAuD,CAAC;AAGpF,eAAO,MAAM,qBAAqB;;;CAA+B,CAAC;AAClE,eAAO,MAAM,aAAa,8CAAkB,CAAC;AAC7C,eAAO,MAAM,yBAAyB,8CAAkB,CAAC;AACzD,eAAO,MAAM,kBAAkB,8CAAkB,CAAC;AAClD,eAAO,MAAM,oBAAoB;;;CAAkC,CAAC;AAGpE,wBAAgB,UAAU,CAAC,CAAC,KAAK,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAMlE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2022 The Parca Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
|
|
14
|
+
import { createParser, parseAsArrayOf, parseAsBoolean, parseAsInteger, parseAsString } from 'nuqs';
|
|
15
|
+
var opts = {
|
|
16
|
+
history: 'replace'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// === Base parsers with common options ===
|
|
20
|
+
export var stringParam = parseAsString.withOptions(opts);
|
|
21
|
+
export var boolParam = parseAsBoolean.withOptions(opts);
|
|
22
|
+
export var intParam = parseAsInteger.withOptions(opts);
|
|
23
|
+
export var commaArrayParam = parseAsArrayOf(parseAsString, ',').withOptions(opts);
|
|
24
|
+
|
|
25
|
+
// === Param-specific parsers with defaults ===
|
|
26
|
+
export var invertCallStackParser = boolParam.withDefault(false);
|
|
27
|
+
export var groupByParser = commaArrayParam;
|
|
28
|
+
export var flamechartDimensionParser = commaArrayParam;
|
|
29
|
+
export var tableColumnsParser = commaArrayParam;
|
|
30
|
+
export var hiddenBinariesParser = commaArrayParam.withDefault([]);
|
|
31
|
+
|
|
32
|
+
// === JSON parser with BigInt support ===
|
|
33
|
+
export function jsonParser() {
|
|
34
|
+
return createParser({
|
|
35
|
+
parse: function parse(value) {
|
|
36
|
+
return JSON.parse(value);
|
|
37
|
+
},
|
|
38
|
+
serialize: function serialize(value) {
|
|
39
|
+
return JSON.stringify(value, function (_, v) {
|
|
40
|
+
return typeof v === 'bigint' ? v.toString() : v;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}).withOptions(opts);
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColorBy.d.ts","sourceRoot":"","sources":["../../src/hooks/useColorBy.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,UAAU,QAAO;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAkBrC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { c as _c } from "react-compiler-runtime";
|
|
8
|
+
// Copyright 2022 The Parca Authors
|
|
9
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
// you may not use this file except in compliance with the License.
|
|
11
|
+
// You may obtain a copy of the License at
|
|
12
|
+
//
|
|
13
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
//
|
|
15
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
// See the License for the specific language governing permissions and
|
|
19
|
+
// limitations under the License.
|
|
20
|
+
|
|
21
|
+
import { useCallback } from 'react';
|
|
22
|
+
import { useQueryState } from 'nuqs';
|
|
23
|
+
import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
|
|
24
|
+
import { stringParam } from './urlParsers';
|
|
25
|
+
export var useColorBy = function useColorBy() {
|
|
26
|
+
var _ref;
|
|
27
|
+
var $ = _c(6);
|
|
28
|
+
var _useUserPreference = useUserPreference(USER_PREFERENCES.COLOR_BY.key),
|
|
29
|
+
_useUserPreference2 = _slicedToArray(_useUserPreference, 2),
|
|
30
|
+
colorByPreference = _useUserPreference2[0],
|
|
31
|
+
setColorByPreference = _useUserPreference2[1];
|
|
32
|
+
var _useQueryState = useQueryState("color_by", stringParam),
|
|
33
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
34
|
+
colorByRaw = _useQueryState2[0],
|
|
35
|
+
setRawColorBy = _useQueryState2[1];
|
|
36
|
+
var colorBy = (_ref = colorByRaw !== null && colorByRaw !== void 0 ? colorByRaw : colorByPreference) !== null && _ref !== void 0 ? _ref : "binary";
|
|
37
|
+
var t0;
|
|
38
|
+
if ($[0] !== setColorByPreference || $[1] !== setRawColorBy) {
|
|
39
|
+
t0 = function t0(value) {
|
|
40
|
+
setRawColorBy(value);
|
|
41
|
+
setColorByPreference(value);
|
|
42
|
+
};
|
|
43
|
+
$[0] = setColorByPreference;
|
|
44
|
+
$[1] = setRawColorBy;
|
|
45
|
+
$[2] = t0;
|
|
46
|
+
} else {
|
|
47
|
+
t0 = $[2];
|
|
48
|
+
}
|
|
49
|
+
var setColorBy = t0;
|
|
50
|
+
var t1;
|
|
51
|
+
if ($[3] !== colorBy || $[4] !== setColorBy) {
|
|
52
|
+
t1 = {
|
|
53
|
+
colorBy: colorBy,
|
|
54
|
+
setColorBy: setColorBy
|
|
55
|
+
};
|
|
56
|
+
$[3] = colorBy;
|
|
57
|
+
$[4] = setColorBy;
|
|
58
|
+
$[5] = t1;
|
|
59
|
+
} else {
|
|
60
|
+
t1 = $[5];
|
|
61
|
+
}
|
|
62
|
+
return t1;
|
|
63
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompareModeMeta.d.ts","sourceRoot":"","sources":["../../src/hooks/useCompareModeMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompareModeMeta.d.ts","sourceRoot":"","sources":["../../src/hooks/useCompareModeMeta.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,KAAK,IAAI,CAAC;CA0E7C,CAAC"}
|