@parca/profile 0.16.304 → 0.16.306
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/useGraphTooltip/index.js +1 -1
- package/dist/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.js +2 -2
- package/dist/ProfileSelector/index.js +2 -1
- package/dist/ProfileTypeSelector/index.d.ts +1 -0
- package/dist/ProfileTypeSelector/index.js +1 -1
- package/package.json +3 -3
- package/src/GraphTooltipArrow/useGraphTooltip/index.ts +1 -1
- package/src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx +2 -2
- package/src/ProfileSelector/index.tsx +2 -3
- package/src/ProfileTypeSelector/index.tsx +1 -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.306](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.305...@parca/profile@0.16.306) (2023-11-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## 0.16.305 (2023-11-15)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.304](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.303...@parca/profile@0.16.304) (2023-11-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -14,7 +14,7 @@ import { divide, valueFormatter } from '@parca/utilities';
|
|
|
14
14
|
import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_LOCATION_ADDRESS, } from '../../ProfileIcicleGraph/IcicleGraphArrow';
|
|
15
15
|
import { getTextForCumulative, nodeLabel } from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
|
|
16
16
|
export const useGraphTooltip = ({ table, unit, total, totalUnfiltered, row, level, }) => {
|
|
17
|
-
if (row === null) {
|
|
17
|
+
if (row === null || row === 0) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
const locationAddress = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row) ?? 0n;
|
|
@@ -57,8 +57,8 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, map
|
|
|
57
57
|
// get the actual values from the columns
|
|
58
58
|
const mappingFile = arrowToString(mappingColumn?.get(row));
|
|
59
59
|
const functionName = arrowToString(functionNameColumn?.get(row));
|
|
60
|
-
const cumulative = BigInt(cumulativeColumn?.get(row));
|
|
61
|
-
const diff = BigInt(diffColumn?.get(row));
|
|
60
|
+
const cumulative = cumulativeColumn?.get(row) !== null ? BigInt(cumulativeColumn?.get(row)) : 0n;
|
|
61
|
+
const diff = diffColumn?.get(row) !== null ? BigInt(diffColumn?.get(row)) : null;
|
|
62
62
|
const childRows = Array.from(table.getChild(FIELD_CHILDREN)?.get(row) ?? []);
|
|
63
63
|
// TODO: Maybe it's better to pass down the sorter function as prop instead of figuring this out here.
|
|
64
64
|
switch (sortBy) {
|
|
@@ -139,7 +139,8 @@ const ProfileSelector = ({ queryClient, querySelection, selectProfile, selectQue
|
|
|
139
139
|
queryExpressionString === '' ||
|
|
140
140
|
queryExpressionString === '{}';
|
|
141
141
|
const compareDisabled = selectedProfileName === '' || querySelection.expression === undefined;
|
|
142
|
-
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: [_jsxs("div", { className: "mb-[2px] flex items-center justify-between", children: [_jsx("label", { className: "text-xs", children: "Query" }), query.matchers.length > 0
|
|
142
|
+
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: [_jsxs("div", { className: "mb-[2px] flex items-center justify-between", children: [_jsx("label", { className: "text-xs", children: "Query" }), (query.matchers.length > 0 || query.inputMatcherString.length > 0) &&
|
|
143
|
+
viewComponent !== undefined && _jsx("div", { children: viewComponent(query.toString()) })] }), _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) => {
|
|
143
144
|
e.preventDefault();
|
|
144
145
|
setQueryExpression();
|
|
145
146
|
}, id: "matcher-search-button", 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 &&
|
|
@@ -10,6 +10,7 @@ interface WellKnownProfiles {
|
|
|
10
10
|
[key: string]: WellKnownProfile;
|
|
11
11
|
}
|
|
12
12
|
export declare const wellKnownProfiles: WellKnownProfiles;
|
|
13
|
+
export declare function flexibleWellKnownProfileMatching(name: string): WellKnownProfile | undefined;
|
|
13
14
|
export declare function profileSelectElement(name: string, flexibleKnownProfilesDetection: boolean): SelectElement;
|
|
14
15
|
export declare const constructProfileName: (type: ProfileType) => string;
|
|
15
16
|
export declare const normalizeProfileTypesData: (types: ProfileType[]) => string[];
|
|
@@ -79,7 +79,7 @@ export const wellKnownProfiles = {
|
|
|
79
79
|
help: 'CPU profile samples observed by Parca Agent.',
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
|
-
function flexibleWellKnownProfileMatching(name) {
|
|
82
|
+
export function flexibleWellKnownProfileMatching(name) {
|
|
83
83
|
const prefixExcludedName = name.split(':').slice(1).join(':');
|
|
84
84
|
const deltaExcludedName = prefixExcludedName.replace(/:delta$/, '');
|
|
85
85
|
const requiredKey = Object.keys(wellKnownProfiles).find(key => {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.306",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@parca/client": "^0.16.98",
|
|
7
|
-
"@parca/components": "^0.16.
|
|
7
|
+
"@parca/components": "^0.16.227",
|
|
8
8
|
"@parca/dynamicsize": "^0.16.60",
|
|
9
9
|
"@parca/hooks": "^0.0.35",
|
|
10
10
|
"@parca/parser": "^0.16.66",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"access": "public",
|
|
51
51
|
"registry": "https://registry.npmjs.org/"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "5b4010db90992ace68168bc7786e45bd242d5a56"
|
|
54
54
|
}
|
|
@@ -194,8 +194,8 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
|
|
|
194
194
|
// get the actual values from the columns
|
|
195
195
|
const mappingFile: string | null = arrowToString(mappingColumn?.get(row));
|
|
196
196
|
const functionName: string | null = arrowToString(functionNameColumn?.get(row));
|
|
197
|
-
const cumulative = BigInt(cumulativeColumn?.get(row));
|
|
198
|
-
const diff: bigint | null = BigInt(diffColumn?.get(row));
|
|
197
|
+
const cumulative = cumulativeColumn?.get(row) !== null ? BigInt(cumulativeColumn?.get(row)) : 0n;
|
|
198
|
+
const diff: bigint | null = diffColumn?.get(row) !== null ? BigInt(diffColumn?.get(row)) : null;
|
|
199
199
|
const childRows: number[] = Array.from(table.getChild(FIELD_CHILDREN)?.get(row) ?? []);
|
|
200
200
|
|
|
201
201
|
// TODO: Maybe it's better to pass down the sorter function as prop instead of figuring this out here.
|
|
@@ -241,9 +241,8 @@ const ProfileSelector = ({
|
|
|
241
241
|
<div className="mb-[2px] flex items-center justify-between">
|
|
242
242
|
<label className="text-xs">Query</label>
|
|
243
243
|
|
|
244
|
-
{query.matchers.length > 0
|
|
245
|
-
<div>{viewComponent(query.
|
|
246
|
-
)}
|
|
244
|
+
{(query.matchers.length > 0 || query.inputMatcherString.length > 0) &&
|
|
245
|
+
viewComponent !== undefined && <div>{viewComponent(query.toString())}</div>}
|
|
247
246
|
</div>
|
|
248
247
|
|
|
249
248
|
<MatchersInput
|
|
@@ -94,7 +94,7 @@ export const wellKnownProfiles: WellKnownProfiles = {
|
|
|
94
94
|
},
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
function flexibleWellKnownProfileMatching(name: string): WellKnownProfile | undefined {
|
|
97
|
+
export function flexibleWellKnownProfileMatching(name: string): WellKnownProfile | undefined {
|
|
98
98
|
const prefixExcludedName = name.split(':').slice(1).join(':');
|
|
99
99
|
const deltaExcludedName = prefixExcludedName.replace(/:delta$/, '');
|
|
100
100
|
const requiredKey = Object.keys(wellKnownProfiles).find(key => {
|