@parca/profile 0.16.383 → 0.16.385
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
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.385](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.384...@parca/profile@0.16.385) (2024-06-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.16.384](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.383...@parca/profile@0.16.384) (2024-06-05)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.383](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.382...@parca/profile@0.16.383) (2024-06-05)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -75,6 +75,6 @@ const MetricsTooltip = ({ x, y, highlighted, contextElement, sampleUnit, delta,
|
|
|
75
75
|
const highlightedNameLabel = nameLabel !== undefined ? nameLabel : { name: '', value: '' };
|
|
76
76
|
return (_jsx("div", { ref: setPopperElement, style: styles.popper, ...attributes.popper, className: "z-10", children: _jsx("div", { className: "flex max-w-md", children: _jsx("div", { className: "m-auto", children: _jsx("div", { className: "rounded-lg border-gray-300 bg-gray-50 p-3 opacity-90 shadow-lg dark:border-gray-500 dark:bg-gray-900", style: { borderWidth: 1 }, children: _jsx("div", { className: "flex flex-row", children: _jsxs("div", { className: "ml-2 mr-6", children: [_jsx("span", { className: "font-semibold", children: highlightedNameLabel.value }), _jsx("span", { className: "my-2 block text-gray-700 dark:text-gray-300", children: _jsx("table", { className: "table-auto", children: _jsxs("tbody", { children: [delta ? (_jsxs(_Fragment, { children: [_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Per Second" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.valuePerSecond, sampleUnit === 'nanoseconds' ? 'CPU Cores' : sampleUnit, 5) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Total" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.value, sampleUnit, 2) })] })] })) : (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Value" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.valuePerSecond, sampleUnit, 5) })] })), highlighted.duration > 0 && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Duration" }), _jsx("td", { className: "w-3/4", children: valueFormatter(highlighted.duration, 'nanoseconds', 2) })] })), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "At" }), _jsx("td", { className: "w-3/4", children: formatDate(highlighted.timestamp, timePattern(timezone), timezone) })] })] }) }) }), _jsx("span", { className: "my-2 block text-gray-500", children: highlighted.labels
|
|
77
77
|
.filter((label) => label.name !== '__name__')
|
|
78
|
-
.map((label) => (_jsx("div", { 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: _jsx(TextWithTooltip, { text: `${label.name}="${label.value}"`, maxTextLength: 37, id: `tooltip-${label.name}
|
|
78
|
+
.map((label) => (_jsx("div", { 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: _jsx(TextWithTooltip, { text: `${label.name}="${label.value}"`, maxTextLength: 37, id: `tooltip-${label.name}` }) }, label.name))) }), _jsxs("div", { className: "flex w-full items-center gap-1 text-xs text-gray-500", children: [_jsx(Icon, { icon: "iconoir:mouse-button-right" }), _jsx("div", { children: "Right click to add labels to query." })] })] }) }) }) }) }) }));
|
|
79
79
|
};
|
|
80
80
|
export default MetricsTooltip;
|
package/dist/useQuery.js
CHANGED
|
@@ -43,8 +43,28 @@ export const useQuery = (client, profileSource, reportType, options) => {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
req.invertCallStack = options?.invertCallStack ?? false;
|
|
46
|
+
const functionToFilter = req.filterQuery;
|
|
47
|
+
if (functionToFilter !== undefined) {
|
|
48
|
+
req.filter = [
|
|
49
|
+
...req.filter,
|
|
50
|
+
{
|
|
51
|
+
filter: {
|
|
52
|
+
oneofKind: 'stackFilter',
|
|
53
|
+
stackFilter: {
|
|
54
|
+
filter: {
|
|
55
|
+
oneofKind: 'functionNameStackFilter',
|
|
56
|
+
functionNameStackFilter: {
|
|
57
|
+
functionToFilter,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
}
|
|
46
65
|
if (options?.binaryFrameFilter !== undefined && options?.binaryFrameFilter.length > 0) {
|
|
47
66
|
req.filter = [
|
|
67
|
+
...req.filter,
|
|
48
68
|
{
|
|
49
69
|
filter: {
|
|
50
70
|
oneofKind: 'frameFilter',
|
|
@@ -60,9 +80,6 @@ export const useQuery = (client, profileSource, reportType, options) => {
|
|
|
60
80
|
},
|
|
61
81
|
];
|
|
62
82
|
}
|
|
63
|
-
else {
|
|
64
|
-
req.filter = [];
|
|
65
|
-
}
|
|
66
83
|
try {
|
|
67
84
|
const { response } = await client.query(req, { meta: metadata });
|
|
68
85
|
return response;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.385",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@headlessui/react": "^1.7.19",
|
|
7
7
|
"@iconify/react": "^4.0.0",
|
|
8
|
-
"@parca/client": "0.16.
|
|
9
|
-
"@parca/components": "0.16.
|
|
8
|
+
"@parca/client": "0.16.117",
|
|
9
|
+
"@parca/components": "0.16.281",
|
|
10
10
|
"@parca/dynamicsize": "0.16.65",
|
|
11
|
-
"@parca/hooks": "0.0.
|
|
11
|
+
"@parca/hooks": "0.0.60",
|
|
12
12
|
"@parca/icons": "0.16.69",
|
|
13
13
|
"@parca/parser": "0.16.74",
|
|
14
|
-
"@parca/store": "0.16.
|
|
15
|
-
"@parca/utilities": "0.0.
|
|
14
|
+
"@parca/store": "0.16.149",
|
|
15
|
+
"@parca/utilities": "0.0.77",
|
|
16
16
|
"@popperjs/core": "^2.11.8",
|
|
17
17
|
"@protobuf-ts/runtime-rpc": "^2.5.0",
|
|
18
18
|
"@tanstack/react-query": "^4.0.5",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public",
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c363742271ee8693a32bb6f6addbacc71a4d11b0"
|
|
75
75
|
}
|
package/src/useQuery.tsx
CHANGED
|
@@ -72,9 +72,29 @@ export const useQuery = (
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
req.invertCallStack = options?.invertCallStack ?? false;
|
|
75
|
+
const functionToFilter = req.filterQuery;
|
|
76
|
+
if (functionToFilter !== undefined) {
|
|
77
|
+
req.filter = [
|
|
78
|
+
...req.filter,
|
|
79
|
+
{
|
|
80
|
+
filter: {
|
|
81
|
+
oneofKind: 'stackFilter',
|
|
82
|
+
stackFilter: {
|
|
83
|
+
filter: {
|
|
84
|
+
oneofKind: 'functionNameStackFilter',
|
|
85
|
+
functionNameStackFilter: {
|
|
86
|
+
functionToFilter,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
}
|
|
75
94
|
|
|
76
95
|
if (options?.binaryFrameFilter !== undefined && options?.binaryFrameFilter.length > 0) {
|
|
77
96
|
req.filter = [
|
|
97
|
+
...req.filter,
|
|
78
98
|
{
|
|
79
99
|
filter: {
|
|
80
100
|
oneofKind: 'frameFilter',
|
|
@@ -89,8 +109,6 @@ export const useQuery = (
|
|
|
89
109
|
},
|
|
90
110
|
},
|
|
91
111
|
];
|
|
92
|
-
} else {
|
|
93
|
-
req.filter = [];
|
|
94
112
|
}
|
|
95
113
|
|
|
96
114
|
try {
|