@parca/profile 0.16.242 → 0.16.243
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/Content.js +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +1 -1
- package/dist/ProfileSelector/index.js +1 -1
- package/package.json +2 -2
- package/src/GraphTooltipArrow/Content.tsx +2 -2
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
- package/src/ProfileSelector/index.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.243](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.242...@parca/profile@0.16.243) (2023-09-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.16.242](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.241...@parca/profile@0.16.242) (2023-08-31)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -95,7 +95,7 @@ onCopy, row, navigateTo, }) => {
|
|
|
95
95
|
const labelPairs = labelColumnNames
|
|
96
96
|
.map((field, i) => [
|
|
97
97
|
labelColumnNames[i].name.slice(pprofLabelPrefix.length),
|
|
98
|
-
table.getChild(field.name)?.get(row) ?? '',
|
|
98
|
+
arrowToString(table.getChild(field.name)?.get(row)) ?? '',
|
|
99
99
|
])
|
|
100
100
|
.filter(value => value[1] !== '');
|
|
101
101
|
const labels = labelPairs.map((l) => (_jsx("span", { className: "mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400", children: `${l[0]}="${l[1]}"` }, l[0])));
|
|
@@ -10,6 +10,6 @@ const ProfileExplorerCompare = ({ queryClient, queryA, queryB, profileA, profile
|
|
|
10
10
|
const closeProfileB = () => {
|
|
11
11
|
closeProfile('B');
|
|
12
12
|
};
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, onCompareProfile: () => { } }) }), _jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, onCompareProfile: () => { } }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { navigateTo: navigateTo, queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource()) }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, onCompareProfile: () => { } }) }), _jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, onCompareProfile: () => { } }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx("div", { children: _jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { navigateTo: navigateTo, queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource()) }) }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
|
|
14
14
|
};
|
|
15
15
|
export default ProfileExplorerCompare;
|
|
@@ -119,7 +119,7 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
|
|
|
119
119
|
queryExpressionString === '' ||
|
|
120
120
|
queryExpressionString === '{}';
|
|
121
121
|
const compareDisabled = selectedProfileName === '' || querySelection.expression === undefined;
|
|
122
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-2 flex", children: [_jsxs("div", { className: "flex w-full flex-wrap content-start items-end justify-between gap-2", children: [_jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Profile type" }), _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error })] }), _jsxs("div", { className: "w-full flex-1", children: [_jsx("label", { className: "text-xs", children: "Query" }), _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Period" }), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection })] }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, { disabled: searchDisabled, onClick: (e) => {
|
|
122
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mb-2 flex gap-2", children: [_jsxs("div", { className: "flex w-full flex-wrap content-start items-end justify-between gap-2", children: [_jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Profile type" }), _jsx(ProfileTypeSelector, { profileTypesData: profileTypesData, loading: profileTypesLoading, selectedKey: selectedProfileName, onSelection: setProfileName, error: error })] }), _jsxs("div", { className: "w-full flex-1", children: [_jsx("label", { className: "text-xs", children: "Query" }), _jsx(MatchersInput, { queryClient: queryClient, setMatchersString: setMatchersString, runQuery: setQueryExpression, currentQuery: query })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs", children: "Period" }), _jsx(DateTimeRangePicker, { onRangeSelection: setTimeRangeSelection, range: timeRangeSelection })] }), _jsxs(ButtonGroup, { children: [!searchDisabled && (_jsx(_Fragment, { children: !comparing && (_jsx(CompareButton, { disabled: compareDisabled, onClick: handleCompareClick })) })), _jsx(Button, { disabled: searchDisabled, onClick: (e) => {
|
|
123
123
|
e.preventDefault();
|
|
124
124
|
setQueryExpression();
|
|
125
125
|
}, children: "Search" })] })] }), _jsx("div", { children: comparing && _jsx(IconButton, { onClick: () => closeProfile(), icon: _jsx(CloseIcon, {}) }) })] }), _jsx("div", { className: "rounded bg-white shadow dark:border-gray-500 dark:bg-gray-700", children: _jsx("div", { style: { height: heightStyle }, children: querySelection.expression !== undefined &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.243",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.86",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public",
|
|
50
50
|
"registry": "https://registry.npmjs.org/"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "fef627c0af7b6169048f9108637cdc92442ad4ae"
|
|
53
53
|
}
|
|
@@ -238,7 +238,7 @@ const TooltipMetaInfo = ({
|
|
|
238
238
|
const labelPairs = labelColumnNames
|
|
239
239
|
.map((field, i) => [
|
|
240
240
|
labelColumnNames[i].name.slice(pprofLabelPrefix.length),
|
|
241
|
-
table.getChild(field.name)?.get(row) ?? '',
|
|
241
|
+
arrowToString(table.getChild(field.name)?.get(row)) ?? '',
|
|
242
242
|
])
|
|
243
243
|
.filter(value => value[1] !== '');
|
|
244
244
|
const labels = labelPairs.map(
|
|
@@ -247,7 +247,7 @@ const TooltipMetaInfo = ({
|
|
|
247
247
|
key={l[0]}
|
|
248
248
|
className="mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400"
|
|
249
249
|
>
|
|
250
|
-
{`${l[0]
|
|
250
|
+
{`${l[0]}="${l[1]}"`}
|
|
251
251
|
</span>
|
|
252
252
|
)
|
|
253
253
|
);
|
|
@@ -88,15 +88,17 @@ const ProfileExplorerCompare = ({
|
|
|
88
88
|
</div>
|
|
89
89
|
<div className="grid grid-cols-1">
|
|
90
90
|
{profileA != null && profileB != null ? (
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
<div>
|
|
92
|
+
<Card className="mt-2 px-6 py-4">
|
|
93
|
+
<ProfileViewWithData
|
|
94
|
+
navigateTo={navigateTo}
|
|
95
|
+
queryClient={queryClient}
|
|
96
|
+
profileSource={
|
|
97
|
+
new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource())
|
|
98
|
+
}
|
|
99
|
+
/>
|
|
100
|
+
</Card>
|
|
101
|
+
</div>
|
|
100
102
|
) : (
|
|
101
103
|
<div>
|
|
102
104
|
<div className="my-20 text-center">
|
|
@@ -199,7 +199,7 @@ const ProfileSelector = ({
|
|
|
199
199
|
|
|
200
200
|
return (
|
|
201
201
|
<>
|
|
202
|
-
<div className="mb-2 flex">
|
|
202
|
+
<div className="mb-2 flex gap-2">
|
|
203
203
|
<div className="flex w-full flex-wrap content-start items-end justify-between gap-2">
|
|
204
204
|
<div>
|
|
205
205
|
<label className="text-xs">Profile type</label>
|