@parca/profile 0.16.129 → 0.16.131
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/Callgraph/index.js +1 -1
- package/dist/ProfileSource.js +11 -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/ProfileSource.tsx +11 -6
- 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,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.131](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.130...@parca/profile@0.16.131) (2023-03-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## 0.16.130 (2023-03-06)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.129](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.128...@parca/profile@0.16.129) (2023-03-02)
|
|
7
15
|
|
|
8
16
|
## 0.16.1 (2023-03-02)
|
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;
|
package/dist/ProfileSource.js
CHANGED
|
@@ -45,12 +45,17 @@ export function ProfileSelectionFromParams(expression, from, to, mergeFrom, merg
|
|
|
45
45
|
expression !== undefined) {
|
|
46
46
|
// TODO: Refactor parsing the query and adding matchers
|
|
47
47
|
var query_1 = Query.parse(expression);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
if (labels !== undefined) {
|
|
49
|
+
ParseLabels(labels !== null && labels !== void 0 ? labels : ['']).forEach(function (l) {
|
|
50
|
+
var hasLabels = labels.length > 0 && labels.filter(function (val) { return val !== ''; }).length > 0;
|
|
51
|
+
if (hasLabels) {
|
|
52
|
+
var _a = query_1.setMatcher(l.name, l.value), newQuery = _a[0], changed = _a[1];
|
|
53
|
+
if (changed) {
|
|
54
|
+
query_1 = newQuery;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
54
59
|
return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), query_1, filterQuery);
|
|
55
60
|
}
|
|
56
61
|
return null;
|
|
@@ -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.131",
|
|
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": "d60fe1c35d044d0ab89c15b6717fd6615cc4bd3a"
|
|
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> => {
|
package/src/ProfileSource.tsx
CHANGED
|
@@ -82,12 +82,17 @@ export function ProfileSelectionFromParams(
|
|
|
82
82
|
) {
|
|
83
83
|
// TODO: Refactor parsing the query and adding matchers
|
|
84
84
|
let query = Query.parse(expression);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
if (labels !== undefined) {
|
|
86
|
+
ParseLabels(labels ?? ['']).forEach(l => {
|
|
87
|
+
const hasLabels = labels.length > 0 && labels.filter(val => val !== '').length > 0;
|
|
88
|
+
if (hasLabels) {
|
|
89
|
+
const [newQuery, changed] = query.setMatcher(l.name, l.value);
|
|
90
|
+
if (changed) {
|
|
91
|
+
query = newQuery;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
91
96
|
|
|
92
97
|
return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), query, filterQuery);
|
|
93
98
|
}
|
|
@@ -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>> = [
|