@parca/profile 0.16.128 → 0.16.130
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 +10 -0
- package/dist/Callgraph/index.js +1 -1
- package/dist/ProfileExplorer/index.js +4 -4
- package/dist/ProfileSelector/index.js +7 -6
- package/dist/ProfileView/ViewSelector.js +1 -1
- package/dist/ProfileView/index.js +6 -1
- package/dist/TopTable/index.js +6 -1
- package/package.json +2 -2
- package/src/Callgraph/index.tsx +2 -1
- package/src/ProfileExplorer/index.tsx +6 -6
- package/src/ProfileSelector/index.tsx +9 -2
- package/src/ProfileView/ViewSelector.tsx +1 -1
- package/src/ProfileView/index.tsx +8 -1
- package/src/TopTable/index.tsx +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.130 (2023-03-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.16.129](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.128...@parca/profile@0.16.129) (2023-03-02)
|
|
11
|
+
|
|
12
|
+
## 0.16.1 (2023-03-02)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @parca/profile
|
|
15
|
+
|
|
6
16
|
## 0.16.128 (2023-03-02)
|
|
7
17
|
|
|
8
18
|
# 0.16.0 (2023-03-01)
|
package/dist/Callgraph/index.js
CHANGED
|
@@ -111,7 +111,7 @@ var Callgraph = function (_a) {
|
|
|
111
111
|
var currentSearchString = (_b = selectQueryParam('search_string')) !== null && _b !== void 0 ? _b : '';
|
|
112
112
|
var isSearchEmpty = currentSearchString === undefined || currentSearchString === '';
|
|
113
113
|
var rawDashboardItems = useURLState({ param: 'dashboard_items' })[0];
|
|
114
|
-
var dashboardItems = rawDashboardItems;
|
|
114
|
+
var dashboardItems = rawDashboardItems !== undefined ? rawDashboardItems : ['icicle'];
|
|
115
115
|
useEffect(function () {
|
|
116
116
|
var getDataWithPositions = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
117
|
var dataAsDot, jsonGraph;
|
|
@@ -72,6 +72,10 @@ var ProfileExplorerApp = function (_a) {
|
|
|
72
72
|
}, [profileTypesError, onError]);
|
|
73
73
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
74
74
|
var from_a = queryParams.from_a, to_a = queryParams.to_a, profile_name_a = queryParams.profile_name_a, labels_a = queryParams.labels_a, merge_from_a = queryParams.merge_from_a, merge_to_a = queryParams.merge_to_a, time_selection_a = queryParams.time_selection_a, compare_a = queryParams.compare_a, from_b = queryParams.from_b, to_b = queryParams.to_b, profile_name_b = queryParams.profile_name_b, labels_b = queryParams.labels_b, merge_from_b = queryParams.merge_from_b, merge_to_b = queryParams.merge_to_b, time_selection_b = queryParams.time_selection_b, compare_b = queryParams.compare_b, filter_by_function = queryParams.filter_by_function, dashboard_items = queryParams.dashboard_items;
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
76
|
+
var expression_a = getExpressionAsAString(queryParams.expression_a);
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
78
|
+
var expression_b = getExpressionAsAString(queryParams.expression_b);
|
|
75
79
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
76
80
|
var _f = useState(null), profileA = _f[0], setProfileA = _f[1];
|
|
77
81
|
var _g = useState(null), profileB = _g[0], setProfileB = _g[1];
|
|
@@ -106,10 +110,6 @@ var ProfileExplorerApp = function (_a) {
|
|
|
106
110
|
time_selection_a = sanitizedRange.time_selection_a;
|
|
107
111
|
from_a = sanitizedRange.from_a;
|
|
108
112
|
to_a = sanitizedRange.to_a;
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
110
|
-
var expression_a = getExpressionAsAString(queryParams.expression_a);
|
|
111
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
112
|
-
var expression_b = getExpressionAsAString(queryParams.expression_b);
|
|
113
113
|
if (((_b = queryParams === null || queryParams === void 0 ? void 0 : queryParams.expression_a) !== null && _b !== void 0 ? _b : '') !== '')
|
|
114
114
|
queryParams.expression_a = expression_a;
|
|
115
115
|
if (((_c = queryParams === null || queryParams === void 0 ? void 0 : queryParams.expression_b) !== null && _c !== void 0 ? _c : '') !== '')
|
|
@@ -123,13 +123,14 @@ var ProfileSelector = function (_a) {
|
|
|
123
123
|
querySelection.expression.length > 0 &&
|
|
124
124
|
querySelection.from !== undefined &&
|
|
125
125
|
querySelection.to !== undefined ? (_jsx(ProfileMetricsGraph, { queryClient: queryClient, queryExpression: querySelection.expression, from: querySelection.from, to: querySelection.to, profile: profileSelection, setTimeRange: function (range) {
|
|
126
|
+
var from = range.getFromMs();
|
|
127
|
+
var to = range.getToMs();
|
|
128
|
+
var mergedProfileParams = {};
|
|
129
|
+
if (query.profileType().delta) {
|
|
130
|
+
mergedProfileParams = { mergeFrom: from, mergeTo: to };
|
|
131
|
+
}
|
|
126
132
|
setTimeRangeSelection(range);
|
|
127
|
-
selectQuery({
|
|
128
|
-
expression: queryExpressionString,
|
|
129
|
-
from: range.getFromMs(),
|
|
130
|
-
to: range.getToMs(),
|
|
131
|
-
timeSelection: range.getRangeKey(),
|
|
132
|
-
});
|
|
133
|
+
selectQuery(__assign({ expression: queryExpressionString, from: from, to: to, timeSelection: range.getRangeKey() }, mergedProfileParams));
|
|
133
134
|
}, addLabelMatcher: addLabelMatcher, onPointClick: function (timestamp, labels, queryExpression) {
|
|
134
135
|
// TODO: Pass the query object via click rather than queryExpression
|
|
135
136
|
var query = Query.parse(queryExpression);
|
|
@@ -30,7 +30,7 @@ var ViewSelector = function (_a) {
|
|
|
30
30
|
var _e = useURLState({
|
|
31
31
|
param: 'dashboard_items',
|
|
32
32
|
navigateTo: navigateTo,
|
|
33
|
-
}),
|
|
33
|
+
}), _f = _e[0], dashboardItems = _f === void 0 ? ['icicle'] : _f, setDashboardItems = _e[1];
|
|
34
34
|
var allItems = [
|
|
35
35
|
{ key: 'table', canBeSelected: !dashboardItems.includes('table') },
|
|
36
36
|
{ key: 'icicle', canBeSelected: !dashboardItems.includes('icicle') },
|
|
@@ -63,7 +63,12 @@ export var ProfileView = function (_a) {
|
|
|
63
63
|
navigateTo: navigateTo,
|
|
64
64
|
}), rawDashboardItems = _d[0], setDashboardItems = _d[1];
|
|
65
65
|
var currentSearchString = useURLState({ param: 'search_string' })[0];
|
|
66
|
-
var dashboardItems =
|
|
66
|
+
var dashboardItems = useMemo(function () {
|
|
67
|
+
if (rawDashboardItems !== undefined) {
|
|
68
|
+
return rawDashboardItems;
|
|
69
|
+
}
|
|
70
|
+
return ['icicle'];
|
|
71
|
+
}, [rawDashboardItems]);
|
|
67
72
|
var isDarkMode = useAppSelector(selectDarkMode);
|
|
68
73
|
var isMultiPanelView = dashboardItems.length > 1;
|
|
69
74
|
var _e = useParcaContext(), loader = _e.loader, perf = _e.perf;
|
package/dist/TopTable/index.js
CHANGED
|
@@ -54,7 +54,12 @@ export var TopTable = React.memo(function TopTable(_a) {
|
|
|
54
54
|
var rawDashboardItems = useURLState({ param: 'dashboard_items' })[0];
|
|
55
55
|
var rawcompareMode = useURLState({ param: 'compare_a' })[0];
|
|
56
56
|
var compareMode = rawcompareMode === undefined ? false : rawcompareMode === 'true';
|
|
57
|
-
var dashboardItems =
|
|
57
|
+
var dashboardItems = useMemo(function () {
|
|
58
|
+
if (rawDashboardItems !== undefined) {
|
|
59
|
+
return rawDashboardItems;
|
|
60
|
+
}
|
|
61
|
+
return ['icicle'];
|
|
62
|
+
}, [rawDashboardItems]);
|
|
58
63
|
var columns = useMemo(function () {
|
|
59
64
|
var cols = [
|
|
60
65
|
columnHelper.accessor('meta', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.130",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.65",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "2eb0e54d2fdb21adfd76f91deef4d8ab33362cac"
|
|
49
49
|
}
|
package/src/Callgraph/index.tsx
CHANGED
|
@@ -186,7 +186,8 @@ const Callgraph = ({graph, sampleUnit, width, colorRange}: Props): JSX.Element =
|
|
|
186
186
|
const isSearchEmpty = currentSearchString === undefined || currentSearchString === '';
|
|
187
187
|
const [rawDashboardItems] = useURLState({param: 'dashboard_items'});
|
|
188
188
|
|
|
189
|
-
const dashboardItems =
|
|
189
|
+
const dashboardItems =
|
|
190
|
+
rawDashboardItems !== undefined ? (rawDashboardItems as string[]) : ['icicle'];
|
|
190
191
|
|
|
191
192
|
useEffect(() => {
|
|
192
193
|
const getDataWithPositions = async (): Promise<void> => {
|
|
@@ -111,6 +111,12 @@ const ProfileExplorerApp = ({
|
|
|
111
111
|
dashboard_items,
|
|
112
112
|
} = queryParams;
|
|
113
113
|
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
115
|
+
const expression_a = getExpressionAsAString(queryParams.expression_a);
|
|
116
|
+
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
118
|
+
const expression_b = getExpressionAsAString(queryParams.expression_b);
|
|
119
|
+
|
|
114
120
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
115
121
|
const [profileA, setProfileA] = useState<ProfileSelection | null>(null);
|
|
116
122
|
const [profileB, setProfileB] = useState<ProfileSelection | null>(null);
|
|
@@ -176,12 +182,6 @@ const ProfileExplorerApp = ({
|
|
|
176
182
|
from_a = sanitizedRange.from_a;
|
|
177
183
|
to_a = sanitizedRange.to_a;
|
|
178
184
|
|
|
179
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
180
|
-
const expression_a = getExpressionAsAString(queryParams.expression_a);
|
|
181
|
-
|
|
182
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
183
|
-
const expression_b = getExpressionAsAString(queryParams.expression_b);
|
|
184
|
-
|
|
185
185
|
if ((queryParams?.expression_a ?? '') !== '') queryParams.expression_a = expression_a;
|
|
186
186
|
if ((queryParams?.expression_b ?? '') !== '') queryParams.expression_b = expression_b;
|
|
187
187
|
|
|
@@ -252,12 +252,19 @@ const ProfileSelector = ({
|
|
|
252
252
|
to={querySelection.to}
|
|
253
253
|
profile={profileSelection}
|
|
254
254
|
setTimeRange={(range: DateTimeRange) => {
|
|
255
|
+
const from = range.getFromMs();
|
|
256
|
+
const to = range.getToMs();
|
|
257
|
+
let mergedProfileParams = {};
|
|
258
|
+
if (query.profileType().delta) {
|
|
259
|
+
mergedProfileParams = {mergeFrom: from, mergeTo: to};
|
|
260
|
+
}
|
|
255
261
|
setTimeRangeSelection(range);
|
|
256
262
|
selectQuery({
|
|
257
263
|
expression: queryExpressionString,
|
|
258
|
-
from
|
|
259
|
-
to
|
|
264
|
+
from,
|
|
265
|
+
to,
|
|
260
266
|
timeSelection: range.getRangeKey(),
|
|
267
|
+
...mergedProfileParams,
|
|
261
268
|
});
|
|
262
269
|
}}
|
|
263
270
|
addLabelMatcher={addLabelMatcher}
|
|
@@ -35,7 +35,7 @@ const ViewSelector = ({
|
|
|
35
35
|
disabled = false,
|
|
36
36
|
}: Props): JSX.Element => {
|
|
37
37
|
const [callgraphEnabled] = useUIFeatureFlag('callgraph');
|
|
38
|
-
const [dashboardItems, setDashboardItems] = useURLState({
|
|
38
|
+
const [dashboardItems = ['icicle'], setDashboardItems] = useURLState({
|
|
39
39
|
param: 'dashboard_items',
|
|
40
40
|
navigateTo,
|
|
41
41
|
});
|
|
@@ -106,7 +106,14 @@ export const ProfileView = ({
|
|
|
106
106
|
navigateTo,
|
|
107
107
|
});
|
|
108
108
|
const [currentSearchString] = useURLState({param: 'search_string'});
|
|
109
|
-
|
|
109
|
+
|
|
110
|
+
const dashboardItems = useMemo(() => {
|
|
111
|
+
if (rawDashboardItems !== undefined) {
|
|
112
|
+
return rawDashboardItems as string[];
|
|
113
|
+
}
|
|
114
|
+
return ['icicle'];
|
|
115
|
+
}, [rawDashboardItems]);
|
|
116
|
+
|
|
110
117
|
const isDarkMode = useAppSelector(selectDarkMode);
|
|
111
118
|
const isMultiPanelView = dashboardItems.length > 1;
|
|
112
119
|
|
package/src/TopTable/index.tsx
CHANGED
|
@@ -76,7 +76,12 @@ export const TopTable = React.memo(function TopTable({
|
|
|
76
76
|
|
|
77
77
|
const compareMode: boolean = rawcompareMode === undefined ? false : rawcompareMode === 'true';
|
|
78
78
|
|
|
79
|
-
const dashboardItems =
|
|
79
|
+
const dashboardItems = useMemo(() => {
|
|
80
|
+
if (rawDashboardItems !== undefined) {
|
|
81
|
+
return rawDashboardItems as string[];
|
|
82
|
+
}
|
|
83
|
+
return ['icicle'];
|
|
84
|
+
}, [rawDashboardItems]);
|
|
80
85
|
|
|
81
86
|
const columns = useMemo(() => {
|
|
82
87
|
const cols: Array<ColumnDef<TopNode, any>> = [
|