@parca/profile 0.19.57 → 0.19.59
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/MatchersInput/index.js +4 -4
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +2 -2
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +2 -1
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +2 -1
- package/dist/useGrpcQuery/index.d.ts +1 -1
- package/dist/useGrpcQuery/index.d.ts.map +1 -1
- package/dist/useGrpcQuery/index.js +2 -2
- package/dist/useQuery.js +2 -2
- package/package.json +4 -4
- package/src/MatchersInput/index.tsx +4 -4
- package/src/ProfileMetricsGraph/hooks/useQueryRange.ts +2 -2
- package/src/ProfileView/components/InvertCallStack/index.tsx +2 -0
- package/src/ProfileView/hooks/useVisualizationState.ts +3 -1
- package/src/useGrpcQuery/index.ts +3 -3
- package/src/useQuery.tsx +2 -2
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.19.59](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.58...@parca/profile@0.19.59) (2025-09-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.19.58](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.57...@parca/profile@0.19.58) (2025-09-26)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.19.57](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.56...@parca/profile@0.19.57) (2025-09-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -26,7 +26,7 @@ export const useLabelNames = (client, profileType, start, end, match) => {
|
|
|
26
26
|
const metadata = useGrpcMetadata();
|
|
27
27
|
const { data, isLoading, error } = useGrpcQuery({
|
|
28
28
|
key: ['labelNames', profileType, match?.join(','), start, end],
|
|
29
|
-
queryFn: async () => {
|
|
29
|
+
queryFn: async (signal) => {
|
|
30
30
|
const request = { match: match !== undefined ? match : [] };
|
|
31
31
|
if (start !== undefined && end !== undefined) {
|
|
32
32
|
request.start = millisToProtoTimestamp(start);
|
|
@@ -35,7 +35,7 @@ export const useLabelNames = (client, profileType, start, end, match) => {
|
|
|
35
35
|
if (profileType !== undefined) {
|
|
36
36
|
request.profileType = profileType;
|
|
37
37
|
}
|
|
38
|
-
const { response } = await client.labels(request, { meta: metadata });
|
|
38
|
+
const { response } = await client.labels(request, { meta: metadata, abort: signal });
|
|
39
39
|
return response;
|
|
40
40
|
},
|
|
41
41
|
options: {
|
|
@@ -50,13 +50,13 @@ export const useLabelValues = (client, labelName, profileType, start, end) => {
|
|
|
50
50
|
const metadata = useGrpcMetadata();
|
|
51
51
|
const { data, isLoading, error } = useGrpcQuery({
|
|
52
52
|
key: ['labelValues', labelName, profileType, start, end],
|
|
53
|
-
queryFn: async () => {
|
|
53
|
+
queryFn: async (signal) => {
|
|
54
54
|
const request = { labelName, match: [], profileType };
|
|
55
55
|
if (start !== undefined && end !== undefined) {
|
|
56
56
|
request.start = millisToProtoTimestamp(start);
|
|
57
57
|
request.end = millisToProtoTimestamp(end);
|
|
58
58
|
}
|
|
59
|
-
const { response } = await client.values(request, { meta: metadata });
|
|
59
|
+
const { response } = await client.values(request, { meta: metadata, abort: signal });
|
|
60
60
|
return sanitizeLabelValue(response.labelValues);
|
|
61
61
|
},
|
|
62
62
|
options: {
|
|
@@ -42,7 +42,7 @@ export const useQueryRange = (client, queryExpression, start, end, sumBy, skip =
|
|
|
42
42
|
}, [stepCountStr, defaultStepCount, setStepCount]);
|
|
43
43
|
const { data, isLoading, error } = useGrpcQuery({
|
|
44
44
|
key: ['query-range', queryExpression, start, end, (sumBy ?? []).join(','), stepCount, metadata],
|
|
45
|
-
queryFn: async () => {
|
|
45
|
+
queryFn: async (signal) => {
|
|
46
46
|
const stepDuration = getStepDuration(start, end, stepCount);
|
|
47
47
|
const { response } = await client.queryRange({
|
|
48
48
|
query: queryExpression,
|
|
@@ -51,7 +51,7 @@ export const useQueryRange = (client, queryExpression, start, end, sumBy, skip =
|
|
|
51
51
|
step: Duration.create(stepDuration),
|
|
52
52
|
limit: 0,
|
|
53
53
|
sumBy,
|
|
54
|
-
}, { meta: metadata });
|
|
54
|
+
}, { meta: metadata, abort: signal });
|
|
55
55
|
return response;
|
|
56
56
|
},
|
|
57
57
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/InvertCallStack/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/InvertCallStack/index.tsx"],"names":[],"mappings":"AAoBA,QAAA,MAAM,eAAe,QAAO,GAAG,CAAC,OA0B/B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -13,6 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { Icon } from '@iconify/react';
|
|
15
15
|
import { Button, useURLState } from '@parca/components';
|
|
16
|
+
import { TEST_IDS, testId } from '@parca/test-utils';
|
|
16
17
|
import { useResetFlameGraphState } from '../../hooks/useResetFlameGraphState';
|
|
17
18
|
const InvertCallStack = () => {
|
|
18
19
|
const [invertStack = '', setInvertStack] = useURLState('invert_call_stack');
|
|
@@ -22,6 +23,6 @@ const InvertCallStack = () => {
|
|
|
22
23
|
setInvertStack(value ? 'true' : '');
|
|
23
24
|
resetFlameGraphState();
|
|
24
25
|
};
|
|
25
|
-
return (_jsxs("div", { className: "flex flex-col", children: [_jsx("label", { className: "text-sm", children: "\u00A0" }), _jsxs(Button, { variant: "neutral", className: "flex items-center gap-2 whitespace-nowrap", onClick: () => handleSetInvert(!isInvert), id: "h-invert-call-stack", children: [_jsx(Icon, { icon: isInvert ? 'ph:sort-ascending' : 'ph:sort-descending', className: "h-4 w-4" }), isInvert ? 'Original' : 'Invert', " Call Stack"] })] }));
|
|
26
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsx("label", { className: "text-sm", children: "\u00A0" }), _jsxs(Button, { variant: "neutral", className: "flex items-center gap-2 whitespace-nowrap", onClick: () => handleSetInvert(!isInvert), id: "h-invert-call-stack", ...testId(TEST_IDS.INVERT_CALL_STACK_BUTTON), children: [_jsx(Icon, { icon: isInvert ? 'ph:sort-ascending' : 'ph:sort-descending', className: "h-4 w-4" }), isInvert ? 'Original' : 'Invert', " Call Stack"] })] }));
|
|
26
27
|
};
|
|
27
28
|
export default InvertCallStack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAC,gBAAgB,EAAC,MAAM,+CAA+C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,QAAO;IACvC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,uBAAuB,EAAE,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5E,yBAAyB,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useVisualizationState.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/hooks/useVisualizationState.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAC,gBAAgB,EAAC,MAAM,+CAA+C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,QAAO;IACvC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,uBAAuB,EAAE,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5E,yBAAyB,EAAE,MAAM,IAAI,CAAC;CA4EvC,CAAC"}
|
|
@@ -49,7 +49,8 @@ export const useVisualizationState = () => {
|
|
|
49
49
|
}, [groupBy, setGroupBy, levelsOfProfiling, resetFlameGraphState]);
|
|
50
50
|
const setGroupByLabels = useCallback((labels) => {
|
|
51
51
|
setGroupBy(groupBy.filter(l => !l.startsWith(`${FIELD_LABELS}.`)).concat(labels));
|
|
52
|
-
|
|
52
|
+
resetFlameGraphState();
|
|
53
|
+
}, [groupBy, setGroupBy, resetFlameGraphState]);
|
|
53
54
|
const resetSandwichFunctionName = useCallback(() => {
|
|
54
55
|
setSandwichFunctionName(undefined);
|
|
55
56
|
}, [setSandwichFunctionName]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
interface Props<IRes> {
|
|
3
3
|
key: unknown[];
|
|
4
|
-
queryFn: () => Promise<IRes>;
|
|
4
|
+
queryFn: (signal?: AbortSignal) => Promise<IRes>;
|
|
5
5
|
options?: {
|
|
6
6
|
enabled?: boolean | undefined;
|
|
7
7
|
staleTime?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useGrpcQuery/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAW,KAAK,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEpE,UAAU,KAAK,CAAC,IAAI;IAClB,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/useGrpcQuery/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAW,KAAK,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEpE,UAAU,KAAK,CAAC,IAAI;IAClB,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KACxC,CAAC;CACH;AAED,QAAA,MAAM,YAAY,GAAI,IAAI,EAAE,6EAIzB,KAAK,CAAC,IAAI,CAAC,KAAG,cAAc,CAAC,IAAI,CAanC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { useQuery } from '@tanstack/react-query';
|
|
14
14
|
const useGrpcQuery = ({ key, queryFn, options: { enabled = true, staleTime, retry, keepPreviousData } = {}, }) => {
|
|
15
|
-
return useQuery(key, async () => {
|
|
16
|
-
return await queryFn();
|
|
15
|
+
return useQuery(key, async ({ signal }) => {
|
|
16
|
+
return await queryFn(signal);
|
|
17
17
|
}, {
|
|
18
18
|
enabled,
|
|
19
19
|
staleTime,
|
package/dist/useQuery.js
CHANGED
|
@@ -33,7 +33,7 @@ export const useQuery = (client, profileSource, reportType, options) => {
|
|
|
33
33
|
options?.sandwichByFunction ?? '',
|
|
34
34
|
protoFiltersKey,
|
|
35
35
|
],
|
|
36
|
-
queryFn: async () => {
|
|
36
|
+
queryFn: async (signal) => {
|
|
37
37
|
const req = profileSource.QueryRequest();
|
|
38
38
|
req.reportType = reportType;
|
|
39
39
|
req.nodeTrimThreshold = options?.nodeTrimThreshold;
|
|
@@ -56,7 +56,7 @@ export const useQuery = (client, profileSource, reportType, options) => {
|
|
|
56
56
|
req.sandwichByFunction = options.sandwichByFunction;
|
|
57
57
|
}
|
|
58
58
|
try {
|
|
59
|
-
const { response } = await client.query(req, { meta: metadata });
|
|
59
|
+
const { response } = await client.query(req, { meta: metadata, abort: signal });
|
|
60
60
|
return response;
|
|
61
61
|
}
|
|
62
62
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.59",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "^0.27.12",
|
|
7
7
|
"@headlessui/react": "^1.7.19",
|
|
8
8
|
"@iconify/react": "^4.0.0",
|
|
9
9
|
"@parca/client": "0.17.5",
|
|
10
|
-
"@parca/components": "0.16.
|
|
10
|
+
"@parca/components": "0.16.374",
|
|
11
11
|
"@parca/dynamicsize": "0.16.67",
|
|
12
12
|
"@parca/hooks": "0.0.103",
|
|
13
13
|
"@parca/icons": "0.16.74",
|
|
14
14
|
"@parca/parser": "0.16.81",
|
|
15
15
|
"@parca/store": "0.16.187",
|
|
16
|
-
"@parca/test-utils": "0.0.
|
|
16
|
+
"@parca/test-utils": "0.0.15",
|
|
17
17
|
"@parca/utilities": "0.0.110",
|
|
18
18
|
"@popperjs/core": "^2.11.8",
|
|
19
19
|
"@protobuf-ts/runtime-rpc": "^2.5.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org/"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "b3966502b60cce3330a8a3ae0ba7b4e20d4d0ea3"
|
|
83
83
|
}
|
|
@@ -59,7 +59,7 @@ export const useLabelNames = (
|
|
|
59
59
|
|
|
60
60
|
const {data, isLoading, error} = useGrpcQuery<LabelsResponse>({
|
|
61
61
|
key: ['labelNames', profileType, match?.join(','), start, end],
|
|
62
|
-
queryFn: async
|
|
62
|
+
queryFn: async signal => {
|
|
63
63
|
const request: LabelsRequest = {match: match !== undefined ? match : []};
|
|
64
64
|
if (start !== undefined && end !== undefined) {
|
|
65
65
|
request.start = millisToProtoTimestamp(start);
|
|
@@ -68,7 +68,7 @@ export const useLabelNames = (
|
|
|
68
68
|
if (profileType !== undefined) {
|
|
69
69
|
request.profileType = profileType;
|
|
70
70
|
}
|
|
71
|
-
const {response} = await client.labels(request, {meta: metadata});
|
|
71
|
+
const {response} = await client.labels(request, {meta: metadata, abort: signal});
|
|
72
72
|
return response;
|
|
73
73
|
},
|
|
74
74
|
options: {
|
|
@@ -100,13 +100,13 @@ export const useLabelValues = (
|
|
|
100
100
|
|
|
101
101
|
const {data, isLoading, error} = useGrpcQuery<string[]>({
|
|
102
102
|
key: ['labelValues', labelName, profileType, start, end],
|
|
103
|
-
queryFn: async
|
|
103
|
+
queryFn: async signal => {
|
|
104
104
|
const request: ValuesRequest = {labelName, match: [], profileType};
|
|
105
105
|
if (start !== undefined && end !== undefined) {
|
|
106
106
|
request.start = millisToProtoTimestamp(start);
|
|
107
107
|
request.end = millisToProtoTimestamp(end);
|
|
108
108
|
}
|
|
109
|
-
const {response} = await client.values(request, {meta: metadata});
|
|
109
|
+
const {response} = await client.values(request, {meta: metadata, abort: signal});
|
|
110
110
|
return sanitizeLabelValue(response.labelValues);
|
|
111
111
|
},
|
|
112
112
|
options: {
|
|
@@ -68,7 +68,7 @@ export const useQueryRange = (
|
|
|
68
68
|
|
|
69
69
|
const {data, isLoading, error} = useGrpcQuery<QueryRangeResponse | undefined>({
|
|
70
70
|
key: ['query-range', queryExpression, start, end, (sumBy ?? []).join(','), stepCount, metadata],
|
|
71
|
-
queryFn: async
|
|
71
|
+
queryFn: async signal => {
|
|
72
72
|
const stepDuration = getStepDuration(start, end, stepCount);
|
|
73
73
|
const {response} = await client.queryRange(
|
|
74
74
|
{
|
|
@@ -79,7 +79,7 @@ export const useQueryRange = (
|
|
|
79
79
|
limit: 0,
|
|
80
80
|
sumBy,
|
|
81
81
|
},
|
|
82
|
-
{meta: metadata}
|
|
82
|
+
{meta: metadata, abort: signal}
|
|
83
83
|
);
|
|
84
84
|
return response;
|
|
85
85
|
},
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import {Icon} from '@iconify/react';
|
|
15
15
|
|
|
16
16
|
import {Button, useURLState} from '@parca/components';
|
|
17
|
+
import {TEST_IDS, testId} from '@parca/test-utils';
|
|
17
18
|
|
|
18
19
|
import {useResetFlameGraphState} from '../../hooks/useResetFlameGraphState';
|
|
19
20
|
|
|
@@ -36,6 +37,7 @@ const InvertCallStack = (): JSX.Element => {
|
|
|
36
37
|
className="flex items-center gap-2 whitespace-nowrap"
|
|
37
38
|
onClick={() => handleSetInvert(!isInvert)}
|
|
38
39
|
id="h-invert-call-stack"
|
|
40
|
+
{...testId(TEST_IDS.INVERT_CALL_STACK_BUTTON)}
|
|
39
41
|
>
|
|
40
42
|
<Icon icon={isInvert ? 'ph:sort-ascending' : 'ph:sort-descending'} className="h-4 w-4" />
|
|
41
43
|
{isInvert ? 'Original' : 'Invert'} Call Stack
|
|
@@ -89,8 +89,10 @@ export const useVisualizationState = (): {
|
|
|
89
89
|
const setGroupByLabels = useCallback(
|
|
90
90
|
(labels: string[]): void => {
|
|
91
91
|
setGroupBy(groupBy.filter(l => !l.startsWith(`${FIELD_LABELS}.`)).concat(labels));
|
|
92
|
+
|
|
93
|
+
resetFlameGraphState();
|
|
92
94
|
},
|
|
93
|
-
[groupBy, setGroupBy]
|
|
95
|
+
[groupBy, setGroupBy, resetFlameGraphState]
|
|
94
96
|
);
|
|
95
97
|
|
|
96
98
|
const resetSandwichFunctionName = useCallback((): void => {
|
|
@@ -15,7 +15,7 @@ import {useQuery, type UseQueryResult} from '@tanstack/react-query';
|
|
|
15
15
|
|
|
16
16
|
interface Props<IRes> {
|
|
17
17
|
key: unknown[];
|
|
18
|
-
queryFn: () => Promise<IRes>;
|
|
18
|
+
queryFn: (signal?: AbortSignal) => Promise<IRes>;
|
|
19
19
|
options?: {
|
|
20
20
|
enabled?: boolean | undefined;
|
|
21
21
|
staleTime?: number | undefined;
|
|
@@ -31,8 +31,8 @@ const useGrpcQuery = <IRes>({
|
|
|
31
31
|
}: Props<IRes>): UseQueryResult<IRes> => {
|
|
32
32
|
return useQuery<IRes>(
|
|
33
33
|
key,
|
|
34
|
-
async () => {
|
|
35
|
-
return await queryFn();
|
|
34
|
+
async ({signal}) => {
|
|
35
|
+
return await queryFn(signal);
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
enabled,
|
package/src/useQuery.tsx
CHANGED
|
@@ -66,7 +66,7 @@ export const useQuery = (
|
|
|
66
66
|
options?.sandwichByFunction ?? '',
|
|
67
67
|
protoFiltersKey,
|
|
68
68
|
],
|
|
69
|
-
queryFn: async
|
|
69
|
+
queryFn: async signal => {
|
|
70
70
|
const req = profileSource.QueryRequest();
|
|
71
71
|
req.reportType = reportType;
|
|
72
72
|
req.nodeTrimThreshold = options?.nodeTrimThreshold;
|
|
@@ -91,7 +91,7 @@ export const useQuery = (
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
try {
|
|
94
|
-
const {response} = await client.query(req, {meta: metadata});
|
|
94
|
+
const {response} = await client.query(req, {meta: metadata, abort: signal});
|
|
95
95
|
return response;
|
|
96
96
|
} catch (e) {
|
|
97
97
|
if (options?.sourceOnly === true) {
|